====== Git branch topography ====== {{template>meta:template:pageinfo#tpl |desc="Document how to get branch topography."}} ===== Steps ===== Append the following code to ~/.gitconfig. Then you can run git lg, git lg1, git lg2 and git lg3 to see the output, respectively. [alias] lg = lg1 lg1 = lg1-specific --all lg2 = lg2-specific --all lg3 = lg3-specific --all lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' ==== Further Reading ==== * [[https://stackoverflow.com/questions/1838873/visualizing-branch-topology-in-git/34467298#34467298]]