我克隆了一个 git 存储库,并在文件中看到了奇怪的文本。头部<<<和>>>>>
例如,我看到代码
<<<<<<< HEAD
public function login()
{
if($this->_identity===null) {
$this->_identity=new UserIdentity($this->username,$this->password);
$this->_identity->authenticate();
}
if($this->_identity->errorCode===UserIdentity::ERROR_NONE) {
=======
/**
* Logs in the user using the given username and password in the model.
* @return boolean whether login is successful
*/
public function login()
{
if($this->_identity===null)
{
$this->_identity=new UserIdentity($this->username,$this->password);
$this->_identity->authenticate();
}
if($this->_identity->errorCode===UserIdentity::ERROR_NONE)
{
>>>>>>> 6f9cd42a2926dccc612900c31769a977e71ed261
$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days
Yii::app()->user->login($this->_identity,$duration);
return true;
}
<<<<<<< HEAD
else return false;
=======
else
return false;
>>>>>>> 6f9cd42a2926dccc612900c31769a977e71ed261
}
}
,但我不知道它意味着什么。谁能解释一下吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这表明不同版本之间存在冲突。
如果您确实在已克隆的存储库中看到了这一点,那么有人就搞砸了,因为他们在解决合并冲突时提交了一些本应编辑的内容(以选择正确的代码位之一)。
It's indicating a conflict between different versions.
If you actually see this in a repository that has been cloned then someone has screwed up, because they have committed something which should have been edited (to choose one of the correct bits of code) when they were resolving a merge conflict.