【发布时间】:2016-10-19 19:10:10
【问题描述】:
我有一个带有以下提交的 GIT 主分支
Master:-
commit one
commit two
现在我创建了一个新的分支 sprint1 并添加了以下内容
Sprint1:
commit one
commit two
commit sprint1 one
此时master和sprint1分道扬镳
Master:
commit one
commit two
commit three
Sprint1:
commit one
commit two
commit sprint1 one
commit sprint1 two
commit sprint1 three
现在,当我将 master 合并到 sprint1 时,我得到以下信息,
Sprint1
commit one
commit two
commit sprint1 one
commit three
commit sprint1 two
commit sprint1 three
commit merged commit
但是当我将 master 合并到 sprint1 时,我期望如下:-
Sprint1
commit one
commit two
commit sprint1 one
commit sprint1 two
commit sprint1 three
commit three
commit merged commit
如何是前者而不是后者。
【问题讨论】:
-
你如何查看提交顺序? github?终端?其他 git 工具?
-
命令行终端..
-
git log --oneline..哪一个是正确的顺序,“提交三”在“sprint 1 two”和“sprint 2 three”之前完成
-
我使用
git log --oneline --graph将分支提交分开并按顺序排列 -
这个命令真的很有帮助..它符合预期..让我重新创建并查看它..非常感谢..