我在本地gir的仓库提交到远程仓库的时候出现如下错误:
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.
给出的提示,一直在提示要重新刷新一下仓库表,但是这并不能解决我的错误。因为我是在提交问题时,写错了comment 和add的顺寻。导致无法正常提交,所以需要强制合并一下分支分体:
使用如下命令
git push -u origin master -f
主要参考这两篇文章:
https://www.cnblogs.com/daemon369/p/3204646.html
https://www.cnblogs.com/daemon369/p/3204646.html
git的提交问题
最新推荐文章于 2025-03-13 09:21:53 发布