Skip to main content

How can I push a local Git branch and automatically track it?

06 Sep 2013 - git

git push -u origin <name_of_branch>

Git 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

References