我克隆了一个git repo并在文件中看到了奇怪的文本.HEAD <<<和>>>>>

Rus*_*lex 3 git commit

例如,我看到代码

<<<<<<< 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
    }
}
Run Code Online (Sandbox Code Playgroud)

我不知道这意味着什么.谁能解释一下?

kar*_*ora 8

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

如果你在克隆的存储库中实际看到这个,那么有人搞砸了,因为他们已经提交了一些应该在解决合并冲突时应该编辑的东西(选择正确的代码之一).

  • 修复冲突并提交. (5认同)