Created
July 11, 2020 18:49
-
-
Save BladeF/17f69fbbf9dc30b50bef042d418678b9 to your computer and use it in GitHub Desktop.
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 | |
echo "************" | |
echo "Initializing repo..." | |
git init | |
echo "Init finished" | |
echo "************" | |
echo "" | |
echo "************" | |
read -p "Please specify a repo type (school, work, personal): " repo | |
read -p "Enter remote URL: " url | |
if [ $repo == "school" ]; then | |
git config --local user.name "Freddie Falcon" | |
git config --local user.email [email protected] | |
git config --local core.sshCommand "ssh -i ~/.ssh/school_key" | |
git remote add origin $url | |
elif [ $repo == "work" ]; then | |
git config --local user.name "Freddie Falcon" | |
git config --local user.email [email protected] | |
git config --local core.sshCommand "ssh -i ~/.ssh/work_key" | |
git remote add origin $url | |
elif [ $repo == "personal" ]; then | |
git config --local user.name "Freddie Falcon" | |
git config --local user.email [email protected] | |
git config --local core.sshCommand "ssh -i ~/.ssh/id_rsa" | |
git remote add origin $url | |
else | |
echo "$repo is not a valid init option: school, work, personal. Try again." | |
exit 1 | |
fi | |
echo "************" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment