当我克隆一个远程存储库时
git clone 'repo_url'git pullgit status我收到这条消息 -
On branch master
Your branch and 'origin/master' have diverged,
and have 41 and 20 different commits each, respectively
Run Code Online (Sandbox Code Playgroud)
当我使用时,git pull -a我没有这个问题.
远程仓库上的东西是不同步的吗?与HEAD和主人?我如何解决它?
编辑1:
当我运行git branch -a:这就是它的样子......
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/clothes
remotes/origin/dunnesBranch
remotes/origin/master
Run Code Online (Sandbox Code Playgroud)
编辑2:
在我看来,origin/master并没有指向最新的代码......然后我运行'git clone'然后运行
git reset --hard origin/master
'git pull'并尝试合并因冲突而失败...
我想......远程仓库的HEAD指向最新的提交,origin/master指向另一个不同的旧提交...我可以在运行git show时验证这一点...
git ×1