Skip to content

Commit

Permalink
Create set_git.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
citlaligm authored Jul 17, 2018
1 parent fd9a1fd commit 8f14f06
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions set_git.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# Make sure you have the latest version of the repo
echo
git pull
echo

# Ask the user for login details
read -p 'Git repository url: ' upstreamVar
read -p 'Git Username: ' userVar
read -p 'Git email: ' emailVar

echo
echo Thank you $userVar!, we now have your credentials
echo for upstream $upstreamVar. You must supply your password for each push.
echo

echo setting up git

git config --global user.name $userVar
git config --global user.email $emailVar
git remote set-url origin $upstreamVar
echo

echo Please verify remote:
git remote -v
echo

echo Please verify your credentials:
echo username: `git config user.name`
echo email: `git config user.email`

0 comments on commit 8f14f06

Please sign in to comment.