When I execute: git pull --rebase
from my feature branch, I get conflicts in lot of files which I've never edited. To get rid of these conflicts I execute following set of commands for each and every conflicted files.
git checkout --ours .
git add .
git rebase --continue
The annoying part is I have to execute this for every conflicts. Is there any way to configure git with a custom command so that above all commands will execute at once.
Something like:
If(featureBranch_04) {
foreach(conflicts)
if(conflictedFile != index.jsp) {
git checkout --ours .
git add .
git rebase --continue
}
}
}
Can I have a similar function in git config ?
The workflow is: First I merged the master branch into featureBranch_04
, and then git pull --rebase
from the featureBranch_04
branch.