我有一个GIT主分支,它有以下提交
Master:-
commit one
commit two现在,我创建了一个新的分支sprint1,并添加了以下内容
Sprint1:
commit one
commit two
commit sprint1 oneTHe主人和sprint1在这一点上有分歧。
Master:
commit one
commit two
commit three
Sprint1:
commit one
commit two
commit sprint1 one
commit sprint1 two
commit sprint1 three现在,当我将主人合并到sprint1中时,我得到以下信息:
Sprint1
commit one
commit two
commit sprint1 one
commit three
commit sprint1 two
commit sprint1 three
commit merged commit但是,当我将主人合并到sprint1中时,我期望这样做:
Sprint1
commit one
commit two
commit sprint1 one
commit sprint1 two
commit sprint1 three
commit three
commit merged commit如何是前者而不是后者。
发布于 2016-10-19 19:52:45
根据文档,提交按反向时间顺序显示。
要按照您期望的顺序获得提交,请尝试使用:
git log --oneline --topo-order这避免了在混合的多行历史上显示提交。
有关详细信息,请参阅:ordering
您还可以使用--graph作为一个更好的输出,分支单独显示。默认情况下,这意味着使用--topo-order选项。
我有时更喜欢使用别名的快速日志版本是:
git --no-pager log --decorate=short --pretty=oneline --abbrev-commit --graph -n 10https://stackoverflow.com/questions/40139657
复制相似问题