I had no idea what useGitLink does, i'll follow your suggestions. 

Passing null to Checkout will work? or should i find the default committish from somewhere?