I recently had a conversation about git reset --hard
vs git checkout -f
, and it turns out they do the same thing. This is one of the tricky things about Git, there are often multiple ways to do the same thing.
Note: git checkout -f
is the same as git checkout .
except -f
works even when there is a currently a merge conflict (git checkout .
throws an error in this situation)
Leave a Reply