Skip to content

Instantly share code, notes, and snippets.

@xero
Created October 1, 2012 21:15
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save xero/3814469 to your computer and use it in GitHub Desktop.
Save xero/3814469 to your computer and use it in GitHub Desktop.
git graph live log
#!/bin/sh
while true;
do
clear
git log \
--graph \
--all \
--color \
--date=short \
-40 \
--pretty=format:"%C(yellow)%h%x20%C(white)%cd%C(green)%d%C(reset)%x20%s%x20%C(bold)(%an)%Creset" |
cat -
sleep 15
done
@xero
Copy link
Author

xero commented Oct 1, 2012

git live log bash script.
i like to run this in it's own terminal window, the graph updates every 15 seconds and give you a nice visual overview of your git repository. the -40 is the number of commits to show. if you omit it and your have a very large number of commits the log will cycle off screen. edit it to fit your personal taste / terminal screen size.

credit for the idea goes to ben hoskings' omglog (https://github.com/benhoskings/omglog) i saw him use it in the advanced git class
from peepcode, and i though... i could do that in bash, no need for ruby gems. and so it is.

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