Fix fatal: Couldn't find remote ref refs/heads/xxx [core] fatal: The remote end hung up unexpectedly
造成原因
- 本地 git 分支出现异常
解决方案
切换到仓库根目录
$
vim .git/config(备注:红色git小写)找到其中的一条内容
[remote "origin"]修改其中的fetch为:fetch = +refs/heads/*:refs/remotes/origin/*再次尝试 $
git pull拉取最新的代码之后,成功!