用管道命令解决git冲突

Jon*_*ink 8 git

我正在尝试编写一些git操作,其中涉及一些变基/挑选/等等.

有没有办法解决冲突,而无需运行如下命令:

git rebase --continue
git cherry-pick --continue
git merge --continue
Run Code Online (Sandbox Code Playgroud)

当git想要提交消息时,我试图避免编辑器被执行.

也许有一种方法可以告诉git事情已经解决并在需要时传入默认提交消息?

LeG*_*GEC 5

您可以使用git commit -m '$msg'提交更改,然后发出命令"继续执行后续步骤":

用于git rebase:

git commit -m '$msg'
git rebase --skip
Run Code Online (Sandbox Code Playgroud)

用于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
Run Code Online (Sandbox Code Playgroud)

对于git merge:
没有git merge --continue指令.如果发生冲突,您只需解决冲突commit.所以git commit -m '$msg'会这样做.