Git提示位于当前分支的后面,冲突 [英] Git tip is behind of current branch, conflict

查看:71
本文介绍了Git提示位于当前分支的后面,冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为发生故障的驱动程序提供解决方法,但最终事实证明这不是必需的.但现在我无法将本地版本推送到主版本.我是唯一一个更新分支的人,但是当我尝试解决此问题时,在此之后我做了几个版本和分支.我想拒绝所有其他版本,然后返回我的(较旧的)工作本地副本并将其推送到服务器.

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.

但是当我得到的时候:

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.

它还希望我提取2个更新(我不希望这样做,因为我的本地版本是可行的版本).我也无法将当前分支重置为此提交".

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".

推荐答案

使用git push -f将分支强制到原始分支.

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

这篇关于Git提示位于当前分支的后面,冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆