错误

remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header

原因

  • 没有编辑好.gitignore文件,造成远端仓库过大,新设备拉取仓库时拉不下来


解决方案

  • 克隆最新一次 commit
git clone https://xxxxxx.git --depth 1
  • 2 下载所有历史
git fetch --unshallow
#或者克隆剩余所有
$ git remote set-branches origin '*'
$ git fetch -v