我克隆了一个git repo,在文件中看到奇怪的文本。头部<<&书信电报;及>&燃气轮机&燃气轮机&燃气轮机&燃气轮机;

我克隆了一个git repo,在文件中看到奇怪的文本。头部<<&书信电报;及>&燃气轮机&燃气轮机&燃气轮机&燃气轮机;,git,commit,Git,Commit,例如,我看到了代码 <<<<<<< HEAD public function login() { if($this->_identity===null) { $this->_identity=new UserIdentity($this->username,$this->password); $this->_identity->authen

例如,我看到了代码

<<<<<<< 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
    }
}
authenticate();
}
如果($this->\u identity->errorCode===UserIdentity::ERROR\u NONE){
=======
/**
*使用模型中给定的用户名和密码登录用户。
*@return boolean是否成功登录
*/
公共函数登录()
{
如果($this->_identity===null)
{
$this->_identity=new UserIdentity($this->username,$this->password);
$this->_identity->authenticate();
}
如果($this->\u identity->errorCode===UserIdentity::ERROR\u NONE)
{
>>>>>>>6f9cd42a2926dccc612900c31769a977e71ed261
$duration=$this->rememberMe?3600*24*30:0;//30天
Yii::app()->user->login($this->\u identity,$duration);
返回true;
}
>6f9cd42a2926dccc612900c31769a977e71ed261
}
}

我不知道这是什么意思。有人能解释一下吗?

这表明不同版本之间存在冲突


如果您在已克隆的存储库中确实看到了这一点,那么有人就搞错了,因为他们在解决合并冲突时提交了一些本应编辑的内容(以选择正确的代码位)。

您可以使用“git日志”在日志中找到一个好的点,然后您可以执行以下操作:“git checkout”返回到旧版本。修复冲突并提交。@RusAlex checkout版本正常。通过克隆,您下载了整个存储库,而不仅仅是您看到的文件。