GIT: should force ever be used?
Git has --force flag in a lot of operations but when I use them I feel a
bit strange. Like ignoring warning messages in my code.
For example I just wanted to unstage a file and did this:
git rm --cached myfile.ext
git complained error:
the following file has staged content different from both the file and the
HEAD
I really don't care about this error and it seems not to be an issue - I
just want to leave my code as it is, but unstage the file. --force flag
simply solved this issue.
My question is about best practices as I was unable to find any
information about this issue - should one use force flags in git commands
or is it a bad practice?
No comments:
Post a Comment