简体   繁体   English

git-我需要推送我的最新更改,并得到我的分支提示落后于远程对等方的错误

[英]git - I need to push my latest changes and get error that my branch tip is behind remote counterpart

Usually to resolve this I do git stash. 通常要解决此问题,我会执行git stash。 But this time I want to make sure I push my change. 但是这次我要确保我推动自己的改变。 Git stash just hides my changes, right? Git隐藏只是隐藏了我的更改,对不对? So is there a way to resolve this error message and make sure I push my code? 那么有没有办法解决此错误消息并确保我推送代码?

You need to fetch recent changes from the remote server and rebase your current branch against them: 您需要从远程服务器获取最近的更改,并根据它们重新建立当前分支:

git pull --rebase git pull --rebase

After that (if you are lucky and no one has pushed more changes) you can push again: 此后(如果您很幸运并且没有人推送更多更改),则可以再次推送:

git push git推

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Git分支提示位于其远程对应项的后面,并防止“推送” - Git branch tip is behind it's remote counterpart and is preventing a 'push' Git 推送错误“您当前分支的提示落后于其远程对应分支” - Git push error "tip of your current branch is behind its remote counterpart" 如何解决GitHub消息,其中显示当前分支的提示位于其远程对应的后面? - How do I resolve a GitHub message that says the tip of my current branch is behind its remote counterpart? git push错误:当前分支位于其远程对应对象的后面 - git push error: current branch is behind its remote counterpart git 推送 - 更新被拒绝,因为当前分支的尖端落后于远程对应 - git push - updates rejected because tip of current branch behind remote counterpart 当我运行“git push”时,我得到“您当前分支的提示在其远程后面”但当前分支没有上游跟踪分支 - When I run "git push" I get "tip of your current branch is behind its remote" but the current branche has no upstream tracking branch 如何修复Git中的问题:“更新被拒绝,因为推送的分支提示位于其远程对应的后面” - How to fix issue in Git: “Updates were rejected because a pushed branch tip is behind its remote counterpart” 如何修复Git推送到远程副本背后 - how to fix Git push behind remote counterpart 当我“ git push origin local-branch”时,远程分支在哪里引用我要将更改推送到? - When i “git push origin local-branch”, where is the remote branch refered that i want to push my changes to? 对于为什么Git相信我的分支技巧落后于原点感到困惑 - Confused as to why Git believes my branch tip is behind the origin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM