Created
March 23, 2013 21:37
-
-
Save kubek2k/5229457 to your computer and use it in GitHub Desktop.
Show git tree everytime we change something (so the screen is not blinking)
- its a good way of showing how git is actually working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
get_last_change() { | |
find .git -type f -exec stat -f "%m %N" {} \; | sort -nr | head -1 | awk '{print $1}' | |
} | |
while [ true ]; do | |
LAST_CHANGE=`get_last_change` | |
clear | |
GIT_PAGER="cat" git log --format=oneline --abbrev-commit --decorate --graph --all | |
while [ true ]; do | |
ANOTHER_CHANGE=`get_last_change` | |
if [ "$LAST_CHANGE" != "$ANOTHER_CHANGE" ]; then | |
break | |
fi | |
sleep 2 | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment