Last active
December 3, 2022 13:17
-
-
Save theSoberSobber/8293f8aa72384aefc9c9cfa9ebdf7035 to your computer and use it in GitHub Desktop.
to step through a gh repo and study it's evolution
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
# include in sys varaibles to use everywhere | |
#!/bin/bash | |
echo "Enter branch name : " | |
read bname | |
chlist=$(git rev-list $bname --reverse) | |
tcnt=$(git rev-list $bname --count) | |
declare -i cnt=0 | |
for ch in $chlist | |
do | |
# temp=$(git stash) # remove the comment hash only when you want to stash any changes you make along the way | |
((cnt++)) | |
echo "Commit number : $cnt/$tcnt" | |
out=$(git checkout $ch) | |
echo $out | |
read | |
done | |
echo "Reached Latest Commit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment