Created
June 11, 2015 07:45
-
-
Save binfeng/c9806b854de3a4ddbb3a to your computer and use it in GitHub Desktop.
Auto commit and push to Github (experimental)
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 | |
#eval "$(ssh-agent -s)" | |
#SERVICE='ssh-agent' | |
#if ps ax | grep -v grep | grep $SERVICE > /dev/null | |
#then | |
# : | |
# #echo "$SERVICE service running, everything is fine" | |
#else | |
# echo "$SERVICE is not running" | |
# eval "$(ssh-agent -s)" | |
#fi | |
#ssh-agent ssh-add ~/.ssh/github_id_rsa | |
cd {your git directory} | |
/usr/bin/git remote rm origin | |
#/usr/bin/git remote add origin '[email protected]:{username}/{repo}.git' | |
/usr/bin/git remote add origin 'https://{token}@github.com/{username}/{repo}.git' | |
#/usr/bin/git rm -rf --cached . | |
/usr/bin/git add . | |
/usr/bin/git commit -am "." | |
/usr/bin/git push --set-upstream origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment