Showing Git branch structure

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):

[alias]
    lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative

git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"

alt text

But if you only wants the different HEAD branches, you could try something along the lines of:

heads = !"git log origin/master.. --format="%Cred%h%Creset;%C(yellow)%an%Creset;%H;%Cblue%f%Creset" | git name-rev --stdin --always --name-only | column -t -s';'"

(using the column command, and here only for commits since the last origin/master commit)

Note: Jakub Narębski recommands adding the option --simplify-by-decoration, see his answer.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)