git 提示:解决冲突后,标记更正的路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30770505/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:17:07  来源:igfitidea点击:

hint: after resolving the conflicts, mark the corrected paths

gitgit-mergegit-revertgit-cherry-pickgit-merge-conflict

提问by paullb

git sometimes gives me this message on a conflict (during a revert or cherry pick)

git 有时会在冲突时给我这个消息(在恢复或樱桃选择期间)

hint: after resolving the conflicts, mark the corrected paths

What does this mean?

这是什么意思?

回答by Nick Volynkin

This means that you need to explicitly tell Git that you've resolved a conflict at each file or folder (that is path).

这意味着您需要明确告诉 Git 您已经解决了每个文件或文件夹(即路径)的冲突。

Showing the list of yet unresolved conflicts:

显示尚未解决的冲突列表:

git status

Marking a conflict as resolved.

将冲突标记为已解决。

File or all files in a folder should be left and all conflicts are resolved:

应保留文件夹中的文件或所有文件,并解决所有冲突:

git add

File or folder should be removed:

应删除文件或文件夹:

git rm

Next step:

下一步:

git commit

回答by xirong

because some files are in conflict ,you can type git statusto find out what is the file with conflict, and after the conflict was sovled ,just git commit -m sth log,at last git cherry-pick your-commmit-id. see details http://wiki.koha-community.org/wiki/Using_Git_Cherry_Pick#Resolve_conflicts

因为有些文件有冲突,你可以打字git status找出有冲突的文件是什么,冲突解决后git commit -m sth log,最后git cherry-pick your-commmit-id。查看详情http://wiki.koha-community.org/wiki/Using_Git_Cherry_Pick#Resolve_conflicts