Git冲突标记[重复]

本文翻译自:Git conflict markers [duplicate]

This question already has an answer here: 这个问题在这里已有答案:

After I pulled from remote branch, I got conflict, when I open the file it looks something like below: 从远程分支拉出后,我遇到了冲突,当我打开文件时,它看起来如下所示:

<<<<<<< HEAD:file.txt
Hello world
=======
Goodbye
>>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt

I need some explanations of the markers, which portion of code is pulled from remote and which is from local? 我需要对标记进行一些解释,哪部分代码是从远程拉出来的,哪些来自本地?

What does the code 77976da35a11db4580b80ae27e8d65caf5208086 stand for? 代码77976da35a11db4580b80ae27e8d65caf5208086代表什么?


#1楼

参考:https://stackoom.com/question/X9dQ/Git冲突标记-重复


#2楼

The line (or lines) between the lines beginning <<<<<<< and ====== here: <<<<<<<======这里开始的行之间的一行(或多行):

<<<<<<< HEAD:file.txt
Hello world
=======

... is what you already had locally - you can tell because HEAD points to your current branch or commit. ...就是你在本地已经拥有的东西 - 你可以说,因为HEAD指向你当前的分支或提交。 The line (or lines) between the lines beginning ======= and >>>>>>> : 行之间的行(或行) =======>>>>>>>

=======
Goodbye
>>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt

... is what was introduced by the other (pulled) commit, in this case 77976da35a11 . ...是另一个(拉)提交引入的内容,在本例中为77976da35a11 That is the object name (or "hash", "SHA1sum", etc.) of the commit that was merged into HEAD . 这是合并到HEAD中的提交的对象名称(或“hash”,“SHA1sum”等)。 All objects in git, whether they're commits (version), blobs (files), trees (directories) or tags have such an object name, which identifies them uniquely based on their content. git中的所有对象,无论它们是提交(版本),blob(文件),树(目录)还是标记都有这样的对象名称,它根据内容唯一地标识它们。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值