How To Undo A Conflicting Merge in GIT

Author: , June 8th, 2021

shell> git merge branch-with-messy-changes

shell> git status

IMPORTANT NOTE: Previous versions of git used different commands for this operation: Latest version: git merge –abort Older than version 1.7.4: git reset –merge Older than version 1.6.2: git reset –hard

How To Revert a Merge in GIT

Author: , November 19th, 2020

To revert the local branch:

To revert the remote branch AFTER the previous step has been performed:

How To Revert the Last git Commit

Author: , July 9th, 2020

shell$ git log | head -1 commit a203e1bd04718bff10a3df4a3389c493c97c0432 Use the commit string as the last argument to the git revert command: shell$ git revert -m 1 a203e1bd04718bff10a3df4a3389c493c97c0432

How To Revert a Single File to a Specific Commit Using git

Author: , March 18th, 2019

~or~

How To Revert All Changes in a git Branch

Author: , August 2nd, 2018

git checkout -f