I am trying to sync code between two streams of work. So I have written a script to auto-merge the changes from master to a developer2 branch. This is working fine until the profile1.xml changes in developer2 are increasing than profilex1.xml in master. So I end up getting conflicts all the time. Is there any to resolve these conflicts through script with losing changes on both ends?
script:
git checkout origin/master
git pull
git checkout origin/developer2
git merge master