I've working with git for pretty long time and still can figure out that. I add some files, I delete some files... When I want to commit, what do I do?
#1
git add .
git commit -m "123"
or
#2
git rm file1_I_removed
git rm file2_I_removed
git rm file3_I_removed
git rm file4_I_removed
git add .
git commit -m "123"
or
#3
git add -u
git commit -m "123"
Note that most probably I don't remember exactly what files I have deleted (even thought I can use git status
and see them), and once I've deleted them, I want them to be deleted from repository as well without trying hard like
git rm file1_I_removed
git rm file2_I_removed ...
git rm fileN_I_removed