![](/img/trans.png)
[英]How to keep local when I see ERROR: [rejected] master -> master (non-fast-forward)
[英]My local branch was on master and I pushed to my remote repo that was on main but now I'm getting a 'non-fast-forward' error
它提示我运行git push origin HEAD
然后我遇到了这个错误:
! [rejected] HEAD -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/Reidwilliamson13/tours-app.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 bash:
git pull --rebase origin HEAD
git推原点HEAD
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.