Created
April 26, 2014 07:18
-
-
Save ivanarrizabalaga/11313887 to your computer and use it in GitHub Desktop.
Personal Git cheatsheet
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
////////////////////// | |
//DEVELOPMENT | |
////////////////////// | |
//Checkout development branch and check | |
git checkout develop | |
git branch | |
//Code for a while | |
emacs.... | |
//Commit changes | |
git commit -a -m "Life is wonderful" | |
//Push changes | |
git push origin develop | |
////////////////////// | |
//STAGING | |
////////////////////// | |
//Merge changes | |
git checkout staging | |
git merge develop | |
//Everything is ok, commit to staging | |
git push origin staging | |
//Deploy to Heroku staging | |
git push staging-heroku staging:master | |
////////////////////// | |
//PRODUCTION | |
////////////////////// | |
//Merge changes | |
git checkout master | |
git merge staging | |
git push production-heroku master:master | |
////////////////////// | |
//OTROS | |
////////////////////// | |
//Work with branches locally | |
git checkout --track origin/develop | |
//Update local repo (non existing branch) with remote branch | |
git branch -f --track develop origin/develop | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment