Created
September 28, 2011 09:15
-
-
Save manuelmorales/1247443 to your computer and use it in GitHub Desktop.
Make git pull and push always do it from the same branch
This file contains hidden or 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
| # From http://mislav.uniqpath.com/2010/07/git-tips/ | |
| # git push will by default push all branches that have the same name on the remote. | |
| # To limit this behavior to just the current branch, set this configuration option: | |
| git config --global push.default tracking | |
| git config push.default tracking | |
| # pushes the "master" branch to "origin" remote and sets up tracking | |
| git push -u origin master | |
| # From now on git pull and git push being on master will always | |
| # do from/to origin master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment