Within my master branch, I did a git merge some-other-branch
locally, but never pushed the changes to origin master. I didn\'t mean to merge, so I\'d like to un
I think you can do git rebase -i [hash] [branch_name]
where [hash]
is the identifying hash for however far back you want to rewind plus one (or however many commits back you want to go) and then delete the lines for the commits in the editor that you don't want any more. Save the file. Exit. Pray. And it should be rewound. You might have to do a git reset --hard
, but it should be good at this point. You can also use this to pull specific commits out of a stack, if you don't want to keep them in your history, but that can leave your repository in a state that you probably don't want.