我有一个问题与我的问题最匹配,但无法添加评论.
git:你的分支和'origin/master'有分歧 - 如何丢弃本地提交?
我运行了上述问题的提示和答案,但没有决定.我正在使用sofwae源代码树跟踪进度图表.我关闭软件并在bash git中运行命令.但是引用了同样的错误.
# Your branch and 'origin/master' have diverged,
# and have 7 and 11 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
Run Code Online (Sandbox Code Playgroud)
我也面临同样的问题.按照运行2个comentos的步骤但没有工作.我认为我的问题是,在我为一个单独的头部结账之前,在个人头部做了一个提交,然后我回到了树枝/主人,并且承诺我做了,我相信引用树头个人.总之,我无法撤消此提交,我在SourceTree软件上以图形方式显示
编辑 - 添加信息: 我想抛弃未发布的提交并进行服务器检出.但解决方案我发现互联网不起作用.我也在gitBash中尝试了git reverse,控制台显示了我开发的消息
$ Git status
On branch processos_criminais_151029
Your branch and 'origin / processos_criminais_151029' have diverged,
and 7 and 11 have different commits each, respectivamente.
(use "git pull" to merge the remote branch into yours)
Changes not staged for commit:
(use "git …Run Code Online (Sandbox Code Playgroud)