繁体   English   中英

我的本地分支在 master 上,我推送到 main 上的远程仓库,但现在我收到“非快进”错误

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM