Created
August 6, 2015 19:54
-
-
Save micahbrich/73197e9b51bf3761b1d6 to your computer and use it in GitHub Desktop.
git-grab – snagging a specific piece of a git repo using SVN, of all things
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 | |
####################################### | |
# List the contents, or download a | |
# folder from a GitHub repo. | |
# Argument: | |
# HTTPS URI to folder | |
####################################### | |
echo ${1} | sed 's/tree\/master/trunk/g' | { read uri; (svn export $uri); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Throw this in a file in
/usr/local/bin
, name itgit-grab
, andchmod +x /usr/local/bin/git-grab
. Run it the first time to set up your SVN credentials, but then by passing it a URL, you can download just a singular folder from a git repo. Credit to @h4w5 for figuring that shnaz out.Usage:
git grab https://github.com/generalassembly/wdi/tree/master/curriculum/baseline/11-deployment/heroku/deploying-a-node-application-lesson/starter-code/app