I save my work on GitHub. Normally, I use the following commands:
git add * # To save all files
git commit -m "a commit"
git push
It works perfectly except for one case: Let's say my repository has two files, file1.c
and file2.c
.
I use above commands, everything is saved. Then, I delete file2.c
, only file1.c
is left.
I run above commands again, and there is no error, but when I clone the repository, both files will be there.
How do I remove these files from my repository?