Reputation: 63
Are the following combinations of commands equivalent?
Combo #1:
git revert HEAD
git revert HEAD
Combo #2:
git revert HEAD
git checkout HEAD^
git commit
Related thread: Git cancel a revert
Upvotes: 1
Views: 795
Reputation: 129526
Yes, except you will be prompted for the commit message in the commit in combo 2. Unless you memorized the format of revert messages and look at the commit you are reverting, you will have a different sha-1.
You can force custom messages in a revert with a --no-commit option and then you can paste in the same message in both case.
Hope this helps.
Upvotes: 1