完整的信息:

error: Ref refs/remotes/origin/user is at 3636498c2ea7735fdcedc9af5ab3c8689e6abe77 but expected a21359c6cc2097c85775cde6a40105f4bd7100ec
From github.com:{github project url}
 ! a21359c..6273ffc  user -> origin/user  (unable to update local ref)

当前回答

经过不断的搜索,这是对我有效的解决方案,需要清除/移除上游

git branch --unset-upstream

其他回答

硬重启也会解决这个问题

git reset --hard origin/master

依次使用下面两个命令。

git gc --prune=now

git remote prune origin

这将解决你的问题。

我运行这个来解决问题:

git gc --prune=now

请按照如下顺序执行以下命令

git gc --prune=now
git remote prune origin
git pull

试试这个,对我很管用。 在您的终端:git远程修剪原点。