Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force merge after reverting merge commit int git

I've merged a branch to master, than reverted merge commit. Now I want to merge the branch again, but merge says that everything is up to date. I understand why -- the branch is already in master's history.

Is there any way to "force" merge in that case or I should just revert the revert of the merge?

like image 215
artvolk Avatar asked Oct 02 '22 17:10

artvolk


1 Answers

There is no way to force a merge; indeed, reverting the revert is the correct way to do it (see https://github.com/git/git/blob/master/Documentation/howto/revert-a-faulty-merge.txt where Linus discusses this). Note that if there are commits on the branch after the (reverted) merge that you want in master, you will need to of course merge in the branch as well.

like image 71
David Deutsch Avatar answered Oct 13 '22 01:10

David Deutsch