Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get birds eye view of git tree with just branch names, not individual commits?

I like the ability of git to give me a visual tree showing how the commits flow on various branches, but with a lot of commits you may drown in detail.

I was wondering how I can just get the basic outline of the branch structure without all the individual commits, but with branch names put in the right locations anyway.

Much like gitk --all . but then zoomed a bit out.

Suggestions?


EDIT: 2013-03-16 - I have still not found a good solution to this. I've found however that the history view in Git Extensions for some reason gives better information than the history view in Eclipse.

like image 348
Thorbjørn Ravn Andersen Avatar asked Nov 15 '11 10:11

Thorbjørn Ravn Andersen


People also ask

How do you see visually branches in git?

Use git log --graph or gitk . (Both also accept --all , which will show all the branches instead of just the current one.)

How can I see commits from one branch?

Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.

How do I find my GitHub branch hierarchy?

Click the File menu, point to Source Control, point to Branching and Merging, and then click View Hierarchy.


2 Answers

Using a hint from the question VonC linked in the comments, the following should suffice:

git log --oneline --decorate --all --graph --simplify-by-decoration 
like image 113
Dan Cruz Avatar answered Sep 21 '22 21:09

Dan Cruz


You can use the --simplify-by-decoration option:

gitk --simplify-by-decoration --all 
like image 31
knittl Avatar answered Sep 24 '22 21:09

knittl