Git tip is behind of current branch, conflict

六月ゝ 毕业季﹏ 提交于 2021-01-29 10:20:08

问题


I tried to make workaround for a failing driver, but eventually it turned out that wasnt needed. but now i seam unable to push my local version to master. I'm the only one updating my branch, but when i tried to fix this, i made several versions and branches after it. I'd like to reject all other versions and go back to my (older) working local copy and push it to server.

but when i do i get:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags 
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.

also it wants me to pull 2 updates (which i dont want to since my local version is the one that works). I'm also not able to "reset current branch to this commit".


回答1:


Use git push -f, to force your branch onto the origin branch.



来源:https://stackoverflow.com/questions/48279359/git-tip-is-behind-of-current-branch-conflict

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!