jeff
jeff

Reputation: 1197

Revert merge without rebase

I realized that a branch was merged to my master branch which shouldn't - commit is already pushed. The branch wasn't rebased - it means i don't see a one "merge commit" - the commits from the branch are in master branch now and i can't tell which commits come from merging and which were previously there.

Can anybody help?

Upvotes: 1

Views: 249

Answers (1)

Sergey K.
Sergey K.

Reputation: 25386

Looks exactly like someone had rebased your branch on top of the current master and then fast-forwarded master to the head of your branch. Or, it could be a series of cherry-picks. The simplest thing is to revert the commits from the master branch one-by-one.

Beware: if you ever merge master branch with the reverted commits into your branch the commits in your branch will be also reverted.

P.S. Have a look here for revert ideas: Rolling back in Git

Upvotes: 1

Related Questions