Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git merge conflicts resolved and there are no changes to commit

I have a 'featurex' branch extends from develop. When I make a pull request to develop I have conflicts. I'm trying to fix it on this lines:

  1. git checkout featurex
  2. git merge develop (and I have conflicts)
  3. I fixed the conflicts (preserving my branch code)
  4. I stage the resolutions of conflicts (and there are any change on stage)
  5. I want to commit but there are not changes to commit

Maybe my proccess is wrong...

like image 443
Daniel Delgado Avatar asked Dec 07 '25 03:12

Daniel Delgado


1 Answers

The answer is git merge --continue and then git push.

As in, you resolve the conflict, then you dont have anything to commit of course, so you just do a git merge --continue and it will make an empty commit.

Other answer said something about git rebase but I guess rebase is not an option if you've commited already to the remote branch, because you're then forced to rewrite history. So you're forced to use git push --force which is a bad pattern. Which I guess it's ok for whoever follows these dark force practices of the sith.

like image 60
Apostolis Anastasiou Avatar answered Dec 08 '25 18:12

Apostolis Anastasiou