Created
November 23, 2020 09:10
-
-
Save myobie/956786ea0ae984c69f02cdfa51a13ae0 to your computer and use it in GitHub Desktop.
Keep things organized with a clone bash function which always puts repos into the correct place
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
clone() { | |
org=$(echo $1 | awk -F/ '{ print $1 }') | |
mkdir -p ~/src/github.com/$org | |
path=~/src/github.com/$1 | |
git clone $@ $path | |
cd $path | |
} | |
# Examples: | |
# $ clone myobie/dot-files | |
# $ clone rails/rails |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment