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.
Here I’ll try to explain what it is, and how you can take the most advantage out of it.
Remote tracking branches
Before trying to understand what the upstream tracking branch is, you need to be familiar with remote branches (e.g. origin/master). If you are not, you probably want to read the section about them in the Pro Git book here.
To see all your remote tracking branches, you can use ‘git branch –remotes’.
The upstream tracking branch
Even if you have never heard of the concept, you probably already have at least one upstream tracking branch: master -> origin/master. When you clone a repository the current HEAD (usually ‘master’) is checked out…
View original post 385 more words