Git tracking 

We’ve been switching to git recently and something mildly annoys me about it not to mention certain colleagues of mine have a dread fear of editing configuration files. In most git tutorials I’ve seen, once you have created your git project and then want to set up tracking of your master branch against a remote server you are required to edit config files. Git has so many nice little tools for doing everything else, why not something for this? So, for swift justice, we decided to remedy the situation with some bash-fu.

With the above snippet in your bash conf (yes, I recognise the irony of editing a config file to give you a command to avoid editing a config file) you can just type:

to track the branch you are currently in against the same branch in that remote. Simple.