Last active
August 29, 2015 14:01
-
-
Save rca/db862e857ba39e7d169b to your computer and use it in GitHub Desktop.
Step through commits in a git branch
This file contains hidden or 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 | |
# step through commits showing the commit information | |
BASE_REV=${BASE_REV:-$1}; | |
current_branch=$(git branch | grep '^*' | awk '{print $2}'); | |
for rev in $(git rev-list ${BASE_REV}..HEAD | tail -r); do | |
git checkout $rev; | |
LESS='CRSX' git show -p $rev; | |
done; | |
git checkout ${current_branch}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment