Using Posh-Git with a BigGit

I like to use Posh-Git in powershell. It provides command line completion for most git commands as well as tags and branches. It also has a nice prompt that always shows the status of your repo. Depending on the size of your Volatile workspace, a git status may incur a delay long enough to make the posh-git prompt annoyingly slow. Here are some tips to improve or mitigate this:
  1. Have git preload the index by issuing git config --global core.preloadindex true. This may make the initial prompt in powershell very slow but it can significantly improve performance of prompts afterwards.
  2. Do a git gc --aggressive. This compacts the repository. It can be good practice to do this sometimes but it is a lengthy operation and may not speed the prompt much.
  3. Turn off the status feature of Posh-Git by adding the path of your git repo to $GitPromptSettings.RepositoriesInWhichToDisableFileStatus.
  4. Pair down your Volatile workspace.

Last edited Jan 14, 2013 at 1:44 AM by mwrock, version 3


No comments yet.