Emma
Emma

Reputation: 2022

Undo git revert from other branch

I made two commits on a feature into master *oops* that should have been made in a feature branch.

To fix the immediate issue, I created a new branch off of master that now contains my feature code. Then, I used git revert sha to create two new commits that undid those two commits in master.

Now that I've done my testing and I'm happy with the results of those two commits, I need to merge my branch back into master, which will essentially mean undoing the two revert commits.

Upvotes: 0

Views: 43

Answers (1)

David Deutsch
David Deutsch

Reputation: 19035

Simply do the merge as you normally would. The fact that it has the same (or similar) effect as reverting a reversion is irrelevant.

Upvotes: 1

Related Questions