Created
September 19, 2018 15:12
-
-
Save GeoffWilliams/21de190c5f6285b68f777885d92dba72 to your computer and use it in GitHub Desktop.
get all revisions from a file from git and copy to directory
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
REFS=$(git log Gemfile | grep commit | awk '{print $2}') | |
for REF in $REFS ; do | |
git checkout $REF Gemfile | |
mkdir -p gemfiles/$REF | |
cp Gemfile gemfiles/$REF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment