Assume you have a file which has been committed in your Git repo.
You remove the file simply by
rm file
The removed file remains in your Git repo although you do not have it.
My old Git complained me that you cannot commit before you git add/rm the file at a similar situation. I would like to have the same behavior back.
How can you make Git not to allow you to commit without solving the problem with the file’s existence first?
What about using:
From git commit manual page:
If you do not want an automatic resolution, but only a warning, a ‘
pre-commit hook‘ is in order.That script would test the output of
And warn you about deleted (but not ‘
git rm‘ed) files