【问题标题】:Git merge (or GitHub pull request) doesn't see all the data from the commitsGit 合并(或 GitHub 拉取请求)没有看到来自提交的所有数据
【发布时间】:2020-04-21 02:32:45
【问题描述】:

我有一个项目,我怀疑我在 git revert 上做错了什么。保留细节,但在这一点上我有:

masterdevelopmove-video-to-task 分支。

move-video-to-task 不属于develop,后者不属于master

我的项目是here。具体来说,问题是如果我比较这两个分支(移动视频到任务),它说没有什么可比较的。如果您查看这些各自分支中的一些单独文件,则需要比较一些更改。然而在本地使用 git merge 它并没有让我选择合并更改,GitHub 上也没有。

知道我可能忽略了什么吗?

【问题讨论】:

    标签: git merge pull-request


    【解决方案1】:

    转到您链接到的页面:

    https://github.com/omartin2010/jetson_object_detection/compare/develop...move-video-to-task

    看看,在那个页面上,它如何建议您尝试“切换基础”?这些字是蓝色的。它们是一个链接。点击它。现在你会看到这个:

    https://github.com/omartin2010/jetson_object_detection/compare/move-video-to-task...develop

    这更像你的预期吗?

    至于发生了什么:您说“将视频移动到任务已停止开发”。是的,但似乎你合并了,也许是错误的方式(似乎以前发生过),或者你只是忘记了合并后你在哪里。无论如何,在合并之后,你在develop,而不是move-video。然后你做了一个提交。所以最新的提交是在develop:

    * commit b1ca78f (HEAD -> develop, origin/develop, origin/HEAD)
    | Author: omartin <omartin@live.ca>
    | Date:   Mon Apr 20 22:14:56 2020 -0400
    | 
    |     fixed missing change from video branch
    |   
    *   commit 8fa08c8
    |\  Merge: 6e9a76f 3e09220
    | | Author: omartin <omartin@live.ca>
    | | Date:   Mon Apr 20 22:12:28 2020 -0400
    | | 
    | |     Merge branch 'move-video-to-task' into develop
    | | 
    | * commit 3e09220 (origin/move-video-to-task)
    | | Author: omartin <omartin@live.ca>
    | | Date:   Mon Apr 20 22:11:34 2020 -0400
    | | 
    | |     added useless change to allow merging
    | | 
    * | commit 6e9a76f
    | | Author: omartin <omartin@live.ca>
    | | Date:   Mon Apr 20 21:59:36 2020 -0400
    | | 
    | |     added missing constantgit
    

    现在,github compare 与git diff 不同。如果你git diff 两个分支,它们之间显然存在差异,因为它们表示不同的提交。但是如果你在 github 上按照你使用的方向比较它们,你会问,“如果我从 move-videodevelop 发出拉取请求会发生什么?” github 回复:“什么都不会发生;你不能向那个方向发出拉取请求,因为 develop 已经从 move-video 快进了。”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-15
      • 2019-03-20
      • 2019-08-02
      • 2020-02-12
      • 2019-09-02
      • 2013-02-02
      • 1970-01-01
      • 2016-03-02
      相关资源
      最近更新 更多