Created
November 26, 2016 23:35
-
-
Save Soulwest/b01e8852521d01f4f6709d917b086dfd to your computer and use it in GitHub Desktop.
Add directory to git
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
#!/bin/bash | |
DIR=$1 | |
read -e -p "Enter git repo:" REPO | |
#echo $REPO | |
#echo $DIR | |
set -e | |
cd $DIR | |
git init . | |
git add * | |
if [ -f .htaccess ]; then | |
git add .htaccess | |
fi | |
git commit -m 'Add directory' | |
git remote add origin $REPO | |
git push origin master:static |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment