Hacker News new | ask | show | jobs
by heme 3319 days ago
Care to share? I have yet to find the right mix of aliases that replicate SourceTree's overview of the whole project.
1 comments

It really depends on what information is important to you. For example, seeing all your branches with visual lines that show how they are connected, you can do something like this in your .gitconfig file:

[alias]

    lg = !"git lg1"

    lg1 = !"git lg1-specific --all"

    lg2 = !"git lg2-specific --all"

    lg3 = !"git 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(black)%s%C(reset) %C(dim black)- %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(black)%s%C(reset) %C(dim black)- %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(black)%s%C(reset)%n''          %C(dim black)- %an <%ae> %C(reset) %C(dim black)(committer: %cn <%ce>)%C(reset)'
Then doing "git lg" or one of these variants gives you a quick tree view. Colors and other customizations can of course be changed.

This is one of many tools I used to replace ST.