cmp.is

git aliases

0 Comments

I’ve discovered magic… git aliases

Quickly! open ~/.gitconfig on your computer using something! (preferably Sublime, Notepad 2, or VIM)

Now add the following awesomness

[alias]
    lol1 = log --graph --abbrev-commit --decorate --date=relative --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(bold yellow)%d%C(reset)' --all
    lol = log --oneline --graph --color --all --decorate

Now you can use git lol and git lol1 and enjoy the magic in your repos today!

Example using mozilla/rust

No colors unfortunately… but you get the gist of it.

Following example from the mozilla/rust repo.

-   09abbbd - (70 minutes ago) auto merge of #16866 : P1start/rust/tuple-indexing, r=brson - bors (origin/auto)
|\
| * bf274bc - (5 weeks ago) Implement tuple and tuple struct indexing - P1start
| | * 3adb46c - (3 hours ago) Register snapshots - Brian Anderson (origin/try)
| |/
|/|
- |   9f6d27c - (6 hours ago) auto merge of #17135 : brson/rust/wininst, r=alexcrichton - bors (HEAD, origin/master, origin/HEAD, master)
|\ \
| * | 5206e79 - (29 hours ago) Fix naming of windows installer - Brian Anderson
- | |   716db00 - (9 hours ago) auto merge of #16680 : brson/rust/readme, r=steveklabnik - bors
|\ \ \
| * | | cd1fabe - (3 weeks ago) Add links to forums in README.md, including discuss.rust-lang.org - Brian Anderson
- | | |   6faa4f3 - (11 hours ago) auto merge of #17129 : epdtry/rust/misc/llvm-root-reconfig, r=brson - bors (origin/snap-stage3)
:

Any issues or suggestions? Tell me on github.

0 Comments