Last active
April 25, 2025 13:44
-
-
Save LeopoldLabs/369ad8363253d7b75476b66f2395c07b to your computer and use it in GitHub Desktop.
bash git clone command shortcut
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
clone () { | |
if [ -z "$1" ]; then | |
echo "Usage: clone <username> <repository> OR clone <repository> after setting up the default username" | |
return 1 | |
fi | |
username="$1" | |
if [ -z "$2" ]; then | |
username="simulationguest" | |
repo="$1" | |
else | |
repo="$2" | |
fi | |
mkdir -p ~/Developer/$username | |
cd ~/Developer/$username | |
git clone [email protected]:$username/$repo.git | |
cd ./$repo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment