【问题标题】:Why does my git commit affect both local and remote?为什么我的 git commit 会同时影响本地和远程?
【发布时间】:2015-01-02 04:05:08
【问题描述】:

所以这发生了......

每次我想做一个提交时,它看起来都修改了本地和远程。

On branch Assessment_Read_SEG-58
Your branch and 'origin/Assessment_Read_SEG-58' have diverged,
and have 1 and 1 different commit each, respectively.
(use "git pull" to merge the remote branch into yours)

我是这个分支中唯一一个工作的人,每当我提交时它总是出现。 据我所知,这一切都设置正确:

Assessment_Read_SEG-58 tracked
KeyBehaviour           tracked
Login                  tracked
development            tracked
master                 tracked
roles                  tracked
Local branches configured for 'git pull':
Assessment_Read_SEG-58 merges with remote Assessment_Read_SEG-58
development            merges with remote development
Local refs configured for 'git push':
Assessment_Read_SEG-58 pushes to Assessment_Read_SEG-58 (local out of date)
development            pushes to development            (up to date)

对吗?

【问题讨论】:

  • 您误解了状态的输出。这意味着您已经完成了 fetch 并且在本地分支中没有上游提交之一。使用mergerebase 获取。
  • 感谢您的回复,我让同事解决了。我们无法准确找到原因,但它现在又可以正常工作了。他做了一些变基来修复它。

标签: git github local commit


【解决方案1】:

我的问题已由一位同事解决,并且可能与我错过了一些提交的意外合并有关。我没有足够的 git 经验来解释细节,但是在合并点之外将其全部分解修复。

【讨论】:

    猜你喜欢
    • 2021-09-21
    • 1970-01-01
    • 2011-02-17
    • 2014-09-08
    • 2011-09-21
    • 2016-12-17
    • 2022-10-20
    • 2019-12-12
    • 1970-01-01
    相关资源
    最近更新 更多