Is there a way to show only the branch structure in Git? There are a number of tools that show the commits graphically, but in my case the list is so long that it's impossible to see the structure. I guess git-log could be the answer, but I can't find any switches that only show the branching commits. This along with "--graph --branches --oneline --all" could do the trick.
EDIT: I'm looking for a way to do this in Ubuntu.
Basic solution is:
If you want to get more fancy:
To get more information on how a particular branch relates to other branches in your repository and remotes, you can use
git wtf
which is an add on script by William Morgan: http://git-wt-commit.rubyforge.org/It produces summary information like:
(example taken from the above URL).
Perhaps what you want is
--simplify-by-decoration
option, see git log documentation:So it would be
or following VonC answer
I am not sure about what you mean by "branch structure".
git log
can help visualize the branches made through commits (See this blog post):But if you only wants the different HEAD branches, you could try something along the lines of:
(using the
column command
, and here only for commits since the lastorigin/master
commit)Note: Jakub Narębski recommands adding the option
--simplify-by-decoration
, see his answer.Maybe I'm missing something, but nobody seems to have mentioned
gitk --all
yet.gitx if you are on a macOS
smartgit for macOS or Windows (but i have not used it)
git-gui to use the native git gui (cross-platform)