Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
git-hist
##
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
##
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"
@bhaity

This comment has been minimized.

Copy link

@bhaity bhaity commented May 7, 2014

nice!

@zrwang

This comment has been minimized.

Copy link

@zrwang zrwang commented Mar 8, 2016

cool!

@profoundhub

This comment has been minimized.

Copy link

@profoundhub profoundhub commented Aug 5, 2016

It does not seem to work anymore!

Got this message:

git: 'hist' is not a git command. See 'git --help'.

Did you mean this?
bisect

@eddiemoya

This comment has been minimized.

Copy link

@eddiemoya eddiemoya commented Aug 17, 2016

Couldn't have just forked it off mine?

@mikofski

This comment has been minimized.

Copy link

@mikofski mikofski commented Jul 14, 2017

note: this gist is nearly identical to @eddiemoya's git-hist.sh from Sept 27, 2013.

@maryemkortoba

This comment has been minimized.

Copy link

@maryemkortoba maryemkortoba commented Apr 19, 2018

great !

@matteocollina

This comment has been minimized.

Copy link

@matteocollina matteocollina commented Sep 5, 2018

Great thank you!

@Sicalxy

This comment has been minimized.

Copy link

@Sicalxy Sicalxy commented Aug 20, 2019

nice, thank you

@RomanKomarnytsky

This comment has been minimized.

Copy link

@RomanKomarnytsky RomanKomarnytsky commented Sep 26, 2019

Thank you, is amazing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.