-
-
Save attacker34/94d15586e046b646a8b5045bd71d7ef8 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