Last active
August 29, 2015 14:13
-
-
Save jasdev/1d2c9cbb9883fb512d07 to your computer and use it in GitHub Desktop.
Clone repo at specific commit
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
clonerev() { | |
git clone $1 | |
cd 'sed ${1}##/*/ s/.git//' | |
git reset --hard $2 | |
} | |
# Usage: clonerev [url] [commit hash] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment