Pushing git image

Hi. I am new in github. I cannot push my image or cannot remove the deleted images from github. How can I solve the issue.?
image

1 Like

You need to tell git that you want to delete (aka rm) the file(s) (git rm ...) (this stages the action) and then you need to tell git that you want a commit (git commit ...) with your staged work:

% cd $(mktemp -d)
tmp.QPppFsHl % git init
Initialized empty Git repository in /private/var/folders/r3/n29fz25x72x191fdv6mhhr3m0000gp/T/tmp.QPppFsHl/.git/
tmp.QPppFsHl % touch a
tmp.QPppFsHl % git add a
tmp.QPppFsHl % git commit -m a
[main (root-commit) 98eb7e3] a
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a
tmp.QPppFsHl % rm a
tmp.QPppFsHl % git status
On branch main
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	deleted:    a

no changes added to commit (use "git add" and/or "git commit -a")
tmp.QPppFsHl % git rm a
rm 'a'
tmp.QPppFsHl % git status
On branch main
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	deleted:    a

tmp.QPppFsHl % git commit -m 'deleting a'
[main b835eeb] deleting a
 1 file changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 a
1 Like