senbion.blogg.se

Git set upstream
Git set upstream





git set upstream

This is useful in order to keep your local branches synchronized with the remote ones, but it’s only scratching the surface. This has some implications on some git tools, for example: when you run “ git status” you might see a message like this: # Your branch is behind 'origin/master' by 1 commit.Īlso, if you run “ git branch -vv“: * master 549ca22 Add bash_profile When you clone a repository, the current branch (usually “ master“) is checked out for you, but also: it’s set up to track “ origin/master“, and thus “ origin/master” is the “upstream” of “ master“. The upstream tracking branchĮven if you have never heard of the concept, you probably already have at least one upstream tracking branch: master ⇒ origin/master. To see all your remote tracking branches, you can use “ git branch -remotes“.

git set upstream

#Git set upstream pro#

If you are not, you probably want to read the section about them in the Pro Git book here (the topic of this blog post is covered in the section Tracking Branches). Remote tracking branchesīefore trying to understand what the upstream tracking branch is, you need to be familiar with remote branches (e.g. Here I’ll try to explain what it is, and how you can take the most advantage out of it. Probably one of most powerful and under-utilized concepts of git is the upstream tracking branch, and to be honest it probably was too difficult to use properly in the past, but not so much any more.







Git set upstream