How To Undo a Merge in GitHub
If you have ever wanted to reverse a git Merge, you might realize how tricky it is. Fortunately, you can get the job done with a few helpful commands. Follow these steps.
Tyler Harz
|
4 steps
|
46 seconds
GitHub
1
To get started, open your "Terminal" or "Shell."
2
Navigate to your repository.
3
Run the following command to see the hashes of commits so you can determine which commit to reference: git reflog [[Enter]]
4
Next, enter the following command to undo the merge: git reset --merge previous-commit [[Enter]]