如果您按下sync
按钮,您将拉取您的朋友所做的更改并在线推送。如果更改没有完全合并,则会提示您发生了冲突。这会将冲突行添加到您必须去解决它们的文件中。之后,您只需要提交更改。
冲突的行应该出现在 Github for Windows 界面中(虽然我不是 100% 确定,但我实际上更喜欢通过命令行解决冲突)。
通过命令行,您必须像这样输入命令:
git pull
# If merge conflict, you'll be prompt to resolve them, git will list conflicted files
# Open those files in you editor and resolve conflicts. Line will be marked in the files.
# When all is resolved :
git add -A
git commit
# No need to enter a message, git will automatically fill the message with
# merge conflict specific information
git push
在您的文件中,冲突标记将如下所示:
<<<<<<<<<<< [sha-1 of the commit]
function() {
==================
function( hey ) {
HEAD>>>>>>>>>>>>>