Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automate Git merge in continuous integration but fail if there are merge conflicts [closed]

The team I am working with would like to use continuous integration to automatically merge two git branches. However we want the continuous integration job to fail if there are merge conflicts, so that the developers can run the merge manually and resolve any issues.

Has anyone had experience of this kind of setup (ideally with TeamCity, but any CI server would be interesting)?

like image 225
Barnaby Golden Avatar asked May 07 '26 14:05

Barnaby Golden


1 Answers

This can be achieved in TeamCity by using the Automatic Merge Build Feature

enter image description here

The merge will only be performed after a successful build, but if there are any conflicts during the merge it will subsequently fail the build.

More details can be found here - TeamCity Documentation

Hope this helps.

like image 182
Evolve Software Ltd Avatar answered May 10 '26 12:05

Evolve Software Ltd