Created
June 6, 2016 15:34
-
-
Save Yuji-Kuroko/57ca5e5df2e6e3f026cf716cdc709a57 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# custom action for SourceTree | |
# params $SHA | |
ARCHIVE_TO="$HOME/Desktop/archive_$(date +'%Y%m%d%H%M%S')/" | |
for commit_hash in $@; do | |
git diff --name-only ${commit_hash}~...${commit_hash} | git checkout-index --prefix=${ARCHIVE_TO} --stdin | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment