Thursday, 13 February 2014

When git cloning locally...

If you clone a local git repository while you are on a given branch, also the new clone will be on that branch.
This is solvable by some easy git fetch but the HEAD will point to the first branch, and will give you headaches when you have to rebase.

the solution is *not* set-upstream, which will track changes from another remote by default, but *set-head* which will point to another local branch.

So, to restore sanity

git remote set-head origin master

All the projects here are under a Creative Commons 3.0 licence! You can use and distribute them as you like (just quote the author so he knows his work is not useless)!

If you wish to get in touch with me write at