我已将一个大文件提交到本地存储库。当上传到遥控器需要很长时间时,我停止上传然后运行:
git reset --soft HEAD~1
之后,我跑了
git add . -A
git commit -m "took out large file"
git push origin master
我收到了这个错误:
$ git push origin master
To git@repos.apostx.com:TOOLS/docs-howtos-and-scripts.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@repos.apostx.com:TOOLS/docs-howtos-and-scripts.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
然后我运行了以下内容:
git pull
git push origin master
但我仍然得到同样的错误。我怎么能解决这个问题?
TIA