redirecting 2> $null seems to cause some issues We want to proceed if not a Git repo, and try to see if it's an HG repo. However, calling Get-BranchName in a build totally kills Psake :(