Created
March 12, 2015 19:56
-
-
Save RichardBronosky/15b95c63781b56862509 to your computer and use it in GitHub Desktop.
Clone a repo into the current directory. Good for moving an existing non-version-controlled project to github repo you just created.
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
# This script is designed so that you can either call it as a script or copy-paste the function into your shell and use it directly. | |
clone_into_here(){ | |
repo=$1 | |
git clone $repo ./tmp_repo | |
mv tmp_repo/* tmp_repo/.* ./ | |
rm -r tmp_repo | |
} | |
clone_into_here($1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment