Git tracking branches

If you are pushing a local branch to your remote repo for theĀ first time:

git push -u origin branch_name

If you already have a local branch that relates to the a remote branch, but it isn’t tracking yet:

git branch -u origin/branch_name

*Note: these instructions assume you have the branch in question checked out already.

    Resources

  • https://www.git-tower.com/learn/git/faq/track-remote-upstream-branch

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.