Created
September 21, 2015 09:00
-
-
Save hearsid/ed325a1586f2e2340936 to your computer and use it in GitHub Desktop.
Bash script to easily deploy the code from your local machine to bitbucket , and then login to the server and download the updated code from bitbucket to your server .
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 | |
git add --all | |
git commit -m "committing all changes" | |
git push origin master | |
ssh -t -t [email protected] << EOF | |
pwd | |
cd /var/www/html/my-app/ | |
pwd | |
git fetch | |
git reset --hard origin/master | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment