Last active
March 13, 2018 23:26
-
-
Save jobertabma/c003ec76dba958489d8d5cf5c741b12f to your computer and use it in GitHub Desktop.
A script to manually iterate over git commits. Use qj/qk to navigate.
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
DIFF_NUMBER=1 | |
while read -n1 -r -p "$DIFF_NUMBER:" && [[ $REPLY != q ]]; do | |
case $REPLY in | |
j) | |
DIFF_NUMBER=`expr $DIFF_NUMBER + 1` | |
;; | |
k) | |
DIFF_NUMBER=`expr $DIFF_NUMBER - 1` | |
;; | |
*) | |
esac | |
git diff HEAD~$DIFF_NUMBER..HEAD~`expr $DIFF_NUMBER - 1` | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment