Git 合并(或 GitHub 拉取请求)没有看到来自提交的所有数据

Git merge (or GitHub pull request) doesn't see all the data from the commits

我有一个项目,我怀疑我在 git 还原时做错了。保留细节,但此时我有:

masterdevelopmove-video-to-task 分支。

move-video-to-task 偏离 develop 而偏离 master.

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

上也没有

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

转到您link进入的页面:

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

看看该页面如何建议您尝试 "switching the base"?这些词是蓝色的。他们是link。点击它。现在你会看到这个:

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

这是否更符合您的预期?

至于发生了什么:你说"move-video-to-task is off of 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 比较与 git diff 不同。如果你 git diff 这两个分支,它们之间显然是有区别的,因为它们表示不同的提交。但是如果你按照你使用的方向在github上比较它们,你问的是,"What would happen if I were to do a pull request from move-video into develop?"而github回复:"Nothing would happen; you can't do a pull request in that direction, because develop is already fast-forwarded from move-video."