git-tf is developed by microsoft guys and … what a surprise it was when I found a download link straight from a microsoft server. Usually, things like that provided on the same site the project is hosted but not this time (promising?).
Well, pretty straightforward and described in the docs: extract zip content, add to PATH, make sure java is in PATH – wait java?!?… ugh.. yes, java but I’ll skip past that, I have it installed anyway.
Of course you need to have git on board. I use GitHub for windows, because they handle msysgit and posh-git install/update.
Get the code
I’m using the ‘Individual Developer with a New Repo’ scenario described in the docs, so to get the code run the following:
1: git tf clone <tfs server address> $/<path to team project branch>
and here’s the first problem:
1: git-tf: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
ookkk, google that and here’s the answer. Didn’t work… at least not at first, but turns out that using your head is a helpful thing. The final solution:
1: keytool -import -alias <cert alias> -file <cert file> -keystore "c:\Program Files (x86)\Java\jre7\lib\security\cacerts"
After this I ran the clone command again and it worked.
Local repository maintenance
Couple of things to do here.
First, the .gitignore:
Second, the recommended git config options (I’ve set them locally because I use different ones globally)
1: git config –local core.autocrlf false
2: git config –local core.ignorecase true
The line ending part is suspicious. When I run git status (after clone, no changes done) it reports that jquery has been modified – this is most likely a line ending thing – I’ll resolve this problem along the way.
The remaining things
Well, there’s using git tf in real life. Let’s see how that goes, but if everything is as expected, I should have the power of git on my local machine without loosing all the things that I configured with tfs build.