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