Undo a Git merge that hasn't been pushed yet
If you've merged branches in Git but haven’t pushed the changes yet, undoing the merge is fairly straightforward. Since nothing has been shared with the remote repository, you have full control to roll it back locally without affecting others. Here's how you can undo the merge safely: 1. If the merge was not committed…
Answered May 11, 2025 · 1.2K Views Read answer →