More BigGit Info:
BigGit at a glance | BigGit Components | Routine BigGit Usage | Posh-Git tips with a BigGit repo | Command Reference | The Making of BigGit

BigGit helps you use Git with Large TFS Repositories

  • Do you need to include several TFS workspace mappings in your git Repo?
  • Does your workspace include binaries, external dependencies or other resources that rarely change?
If you can answer yes to either of these questions and have been unsuccessful using git-tf or git-tfs to bridge your TFS workspace to git, then you may have found a solution here.

BigGit is a Powershell module companion to Git-Tf that allows you to map multiple workspace mappings to a single git repo and minimize the size of this repo by storing infrequently changing workspace content like binaries, external dependencies, build artifacts, documentation, etc. separately but keeps everything in one work tree.

How to use BigGit

  • Determine which TFS workspace mappings change infrequently or never
  • Install BigGit and import BigGit.psm1 or get it from Chocolatey:
    iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))
    ."$env:systemdrive\Chocolatey\chocolateyinstall\chocolatey.ps1" install BigGit
  • Compose your mappings:
$myWorkspace = "MyWorkspace;Matt Wrock"
$serverRoot="/root/branch"
$tfsUrl = "http://tfsServer:8080/tfs"

$NonVolatileMappings = Invoke-TF workfold /collection:$tfsUrl /workspace:$myWorkspace | ?{ 
    $_.ToLower() -match "($serverRoot/external(/|:))|($serverRoot/build(/|:))|($serverRoot/lib(/|:))|($serverRoot/runtimes(/|:))"
} 

$VolatileMappings = Invoke-TF workfold /collection:$tfsUrl /workspace:$myWorkspace | ?{ 
    $_.ToLower() -notmatch "($serverRoot/external(/|:))|($serverRoot/build(/|:))|($serverRoot/lib(/|:))|($serverRoot/runtimes(/|:))"
}
  • Invoke the BigGit Install to set everything up:
Install-BigGit -tfsUrl $tfsUrl -serverPathToBranch "`$$serverRoot" -partialBranchPath $/root/mypartialbranchlocation -localPath  c:\dev\BigGit -remoteOrigin \\myserver\gitshare -NonVolatileMappings $NonVolatileMappings -VolatileMappings $VolatileMappings
All of your source is now under c:\dev\BigGit\git. The Nonvolatile mappings are physically elsewhere but symbolically linked to the Git repo and ignored by git.
  • Get Recent Changes from TFS:
Invoke-ForwardIntegration
  • Send Changes to TFS
Invoke-ReverseIntegration "some great changes here"

Last edited Jan 29, 2013 at 5:30 PM by mwrock, version 20