Skip to content

Instantly share code, notes, and snippets.

@ecasilla
Created March 20, 2014 17:28
Show Gist options
  • Select an option

  • Save ecasilla/9669241 to your computer and use it in GitHub Desktop.

Select an option

Save ecasilla/9669241 to your computer and use it in GitHub Desktop.
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
Copy link
Copy Markdown

bhaity commented May 7, 2014

nice!

@zrwang
Copy link
Copy Markdown

zrwang commented Mar 8, 2016

cool!

@profoundhub
Copy link
Copy Markdown

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
Copy link
Copy Markdown

Couldn't have just forked it off mine?

@mikofski
Copy link
Copy Markdown

mikofski commented Jul 14, 2017

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

@maryemkortoba
Copy link
Copy Markdown

great !

@matteocollina
Copy link
Copy Markdown

Great thank you!

@Sicalxy
Copy link
Copy Markdown

Sicalxy commented Aug 20, 2019

nice, thank you

@RomanKomarnytsky
Copy link
Copy Markdown

Thank you, is amazing :)

@Ajith2407
Copy link
Copy Markdown

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

The most similar command is
bisect

@Kr3m
Copy link
Copy Markdown

Kr3m commented Jan 25, 2023

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

The most similar command is bisect

You have to copy the very last line and enter that into your terminal and hit enter. Then you can use git hist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment