Skip to content

Instantly share code, notes, and snippets.

@mikecharles
Last active December 11, 2017 20:00
Show Gist options
  • Save mikecharles/e808c77ddcc5ff239fe2696c61ffe1f1 to your computer and use it in GitHub Desktop.
Save mikecharles/e808c77ddcc5ff239fe2696c61ffe1f1 to your computer and use it in GitHub Desktop.
Display git status and graph continuously in the terminal

Note that this requires the following alias set in $HOME/.gitconfig:

[alias]
  tree = "!f() { git log $@ --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit ; }; f"
while true ; do
clear
printf "\e[0;35mgit status\n----------\n\n\e[m"
git status
printf "\e[0;35m\ngit graph\n---------\n\n\e[m"
git --no-pager tree --branches --remotes --tags -n 15
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment