I am learning Git and am unable to understand under what condition the -f flag is used while issuing the \"git rm\" command. Please explain a scenario where rm -f would be r
If you edit a file, and then realize you want to delete it instead.
$ ls func.c $ vim func.c ...edit the file...
Now that I think about it, I actually want to delete it...
$ git rm func.c error: 'func.c' has local modifications (use --cached to keep the file, or -f to force removal) $ git rm -f func.c