在新克隆的github项目的补丁的第一个git push
上看到此错误:
! [remote rejected] master -> master (shallow update not allowed)
error: failed to push some refs to 'https://github.com/org/myproject.git'
如何修复它,可能是什么原因?
有人建议,这个问题与Remote rejected (shallow update not allowed) after changing Git remote URL无关。
答案 0 :(得分:0)
一个可能的原因可能是您最初使用的是分支
git clone --depth=1 ...link...
如果是这样,修复很容易;
git fetch --unshallow origin