简体   繁体   English

“git log”只能显示分支(不是中间提交)吗?

[英]Can “git log” show branches only (not the intermediate commits)?

I'd like to be able to see the relationship between all my branches. 我希望能够看到我所有分支之间的关系。

Git log is a beautiful thing: Git日志是一件很美的事:

git log --graph --all --format=oneline

The output it produces is quite verbose (since I tend to make a lot of small commits on each branch). 它产生的输出非常冗长(因为我倾向于在每个分支上进行大量的小提交)。 What I am looking for is a way to show only the commits that correspond to the head of a branch (just the branch name without the commit summary is fine) 我正在寻找的是一种只显示与分支头部相对应的提交的方法(只是没有提交摘要的分支名称很好)

Are there flags to git log or another git command for this? 是否有git log或其他git命令的标志?

You're after the --no-walk option. 你是在--no-walk选项之后。 (also --branches instead of --all , I'd guess). (也是 - --branches而不是--all ,我猜)。

From comments, you want the output gitk's "simple history" produces. 从评论中,您希望输出gitk的“简单历史”产生。 Gitk uses --simplify-by-decoration to get that. --simplify-by-decoration使用--simplify-by-decoration来获得它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM