Reputation: 201
I have multiple repositories and multiple developers are working on multiple repositories, now if i create a feature branch of the develop branch on any of the repositories and there are other developers who also created a feature branch and they have merger their code in the develop branch, so when i raise pull request against the develop branch i get conflicts and i have to manually resolve that, so what i thought is writing a common jenkins to sync the feature branch with the develop branch once PR is raised so it automatically resolves the conflicts no manual efforts required.
So i have a groovy script in that i am also checking for linting errors and before checking linting i want to sync the feature branch with develop branch.
git checkout develop,
git pull origin develop,
git checkout feature_branch,
git rebase develop,
Is this correct way of syncing the feature branch and if not plz suggest one.
Upvotes: 0
Views: 288
Reputation: 1380
You can't automatically resolve conflicts. Conflicts exist because an automatic attempt to merge the code has already failed. There are two valid possibilities that require intelligence to choose between. Also, this is not a python question.
Upvotes: 1
Reputation: 30204
There's no way to automatically solve conflicts.... other than instruct to use the code from one of the branches.
Upvotes: 1