问题
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