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:
- 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.
- 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.
- Turn off the status feature of Posh-Git by adding the path of your git repo to $GitPromptSettings.RepositoriesInWhichToDisableFileStatus.
- Pair down your Volatile workspace.