git-tf first encounter

By eidias on (tags: git, tfs, categories: tools)

As promised here I’ll share some info on using git-tf. Just started, so the impressions may change but as a starter that should be good enough.


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?).

Here’s the link to the project page. Note that there is also a git-tfs project – the story behind the two is explained in the last paragraph of this post.


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: PKIX path building failed: 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"

I did that for the entire trust chain (not sure if that was required or it would be enough to just force trust on the ‘final’ certificate). The key thing here is to provide the mentioned keystore. If you skip the param, then a default keystore is created (located in <UserDir>/.keystore) and that doesn’t solve the problem. The default password for the keystore is ‘changeit’. 

After this I ran the clone command again and it worked.

Local repository maintenance

Couple of things to do here.

First, the .gitignore:

   1: _ReSharper*
   2: *.suo
   3: *.csproj.user
   4: *.sln.DotSettings.user
   5: bin
   6: obj

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.