Use master branch by default

it seems the new style Git source step do not use master by default (which is the documented behavior)

Please note I changed all occurrences that made sense to me, leaving a couple "HEAD" around on functions that retrieve data about the last commit; I'm not 100% sure about that so please take it into account during review.