Set upstream master in Git

If you wish to set tracking information for this branch you can do so with:

[code language=”bash”]git branch –set-upstream master origin/<branch>[/code]

Where could be master.

An example would be:

[code language=”bash”]git branch –set-upstream master origin/master[/code]

With this, you can just do a git pull and git push without having the branch specified.

Leave a Reply

Your email address will not be published. Required fields are marked *