Resolve git conflict with plumbing teams

I am trying to execute a script with some git operations that are related to some reinstallations / cherries etc.

Is there a way to resolve the conflict without having to run commands, for example:

git rebase --continue git cherry-pick --continue git merge --continue 

I am trying to avoid editor execution when git wants to pass a message.

Perhaps there is a way to tell git that everything has been resolved and a default error message sent if necessary?

+8
git
source share
2 answers

You can use git commit -m '$msg' to commit the changes, and then issue the "Continue the following steps" command:

For git rebase :

 git commit -m '$msg' git rebase --skip 

For git cherry_pick :

 git commit -m '$msg' # if you are cherry-picking several commits at once, # this will skip the current (conflicting) one, and proceed with the remaining ones : git reset git cherry-pick --continue 

For git merge :
There is no git merge --continue . In case of conflict, you just fix the conflict, then commit . So git commit -m '$msg' will do this.

+5
source share

Try using the -x option. Thats options:

-x When recording a commit, add a line that says: "(cherry selected from commit ...)" in the original commit message to indicate which of these changes were selected from cherry. This is done only for cherries without conflict. Do not use this if you selected cherries from your private branch, because the information is useless to the recipient. If, on the other hand, you select a cherry between two visible visible branches (for example, a backporting fix for a maintenance branch for an older version from a development branch), adding this information may be useful.

git-scm.herokuapp.com/docs/git-cherry-pick

Also --allow-empty may be useful

+3
source share

All Articles