P
P
psfpro2015-02-26 17:34:18
git
psfpro, 2015-02-26 17:34:18

How to rollback a fast forward merge from a remote branch?

There are develop, feature and master branches.
There were 10 necessary commits in feature that needed to be merged into master, but 100 commits from the develop branch were merged into the featuere branch using the fast forward method, which cannot be merged into master.
How to merge the necessary changes from feature to master?
Is it possible to roll back this merge and what is the best way to do it in such situations?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor, 2015-02-26
@psfpro

git checkout master
git merge commit_hash

Where commit_hash is the hash of the last "good" commit.
You can merge not only from the HEAD branch, but also from any commit.
But you can roll back:
git checkout feature
git reset commit_hash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question