Skip to content

Instantly share code, notes, and snippets.

@RichardBronosky
Created March 12, 2015 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardBronosky/15b95c63781b56862509 to your computer and use it in GitHub Desktop.
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 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