Remove-PoshGitFromProfile
(git-for-windows/build-extra#401) (PR #877) Thanks @dscho
- Fix branch status when cherry-picking, merging, reverting (#818) (PR #828) (PR #894) Thanks @NihilityT
- Fix tab expansion for PowerShell aliases to
git.exe
(#854) (PR #855) - Fix tab expansion for symbolic refs (#867) (PR #868) Thanks @dmringo
- Fix status inside
.github
directories (#873) (PR #874) (PR #893) Thanks @jethas-bennettjones - Version warning no longer flags VFS for Git (#860) (PR #884) Thanks @shmuelie
- Version warning no longer flags Git for Windows release candidates (#845) (PR #885) Thanks @dscho
- Migrated to GitHub Actions (PR #878) Thanks @dscho
- Fixed Scoop install instructions (PR #862) Thanks @cjstewart88
- Fix typo (PR #887) Thanks @bennett1412
- Released to PowerShell Gallery.
- Fate of Chocolatey to be determined.
- Added --renormalize to the "git add" parameters for tab-completion. (PR #791) Thanks @dannoe
- Pass PowerShell aliases down to posh-git TabExpansion autocomplete function (#257) (PR #779) Thanks @csc027
- Autocomplete user-defined pretty formats (#786) (PR #802) Thanks @rdnlsmith
- Add warning for cygwin version of git, which does not play nicely (#771) (PR #807)
- Add BeforePath and AfterPath settings (#821) (PR #822) Thanks @breisfeld Brad Reisfeld
$GitPromptSettings.DefaultPromptAbbreviateHomeDirectory
defaults to$false
on Windows. When enabled,~
is always substituted for the user's home path. Before this change, when directly in your home dir, this setting would result in the full path displayed in the prompt e.g.C:\Users\Keith
. After this change,~
will be displayed. The new behavior is consistent with how the home path is displayed in prompts in other shells on Linux. (#746) (PR #801)- Adds
--no-optional-locks
when invoking git to reduce conflicts with other tools. (PR #774) Thanks @jessehouwing
- Put 'CACHE ERROR' in prompt when GitStatusCache returns failure. (PR #759) Thanks @cmarcusreid
- Honor EnableStashStatus when using cache (#761) (PR #762)
- Register-ArgumentCompleter based tab-expansion in beta4 doesn't work with PowerShell aliases to git,tgit,gitk. (#769) (PR #770)
- Module now works in (and is tested in) strict mode (PR #783)
- "git help --all" output breaks $GitTabSettings.AllCommands = $true. (#788) (PR #790) Thanks @dannoe
- Fixed non-ascii git branch name garbled (PR #796) Thanks @LittleboyHarry
- Fix tab completion of branches in different worktrees (PR #805) Thanks @wallybh
- Using
DarkYellow
no longer results in extra$Errors
(PR #806)
- Branch name completion to the new
Remove-GitBranch
command. (PR #678) (PR #705) $global:GitPromptValues
with the following properties to enable users to have access to the information necessary to display error status in their prompt as well as debug their prompt customizations:DollarQuestion
IsAdmin
LastExitCode
LastPrompt
(PR #684)
- Added tab-completion for new
git restore
andgit switch
commands. (#691) (PR #702) (PR #743) Thanks @pinkfloydx33 for the direction and motivation to add this. - Added tab-completion for
git merge --allow-unrelated-histories
(#632) (PR #633) - Abbreviate path from git root with new setting
DefaultPromptAbbreviateGitDirectory
(#719) (PR #720) (PR #729) Thanks Philippe Elsass (@elsassph) - Two new properties have been added to
$global:GitTabSettings
EnableLogging
- default is$false
but when set to$true
, tab expansion functions log to a file.LogPath
- the path to the log file that is appended to (created if necessary) whenEnableLogging
is$true
.
- Module parameter changed from a [switch] that forced the posh-git prompt to be used to a bools. The use of this
parameters during import is now simplified to:
Import-Module posh-git -Args 1
. - Shortened up the Windows title text to work better with Windows Terminal tabs. Now only displays '32-bit' in 32-bit PowerShell, otherwise assumption is you're running 64-bit. Also display only PowerShell major.minor version number. (PR #707)
- Switched from overriding
TabExpansion
function to usingRegister-ArgumentCompleter
for tab-completion on PowerShell >= 6.0.posh-git
can be configured to use the oldTabExpansion
function on PowerShell >= 6.0 by importing the module using the following arguments:Import-Module posh-git -ArgumentList 0,1
before importingposh-git
. (#609) (PR #711) Thanks Andrew Bradley (@cspotcode) - Update Ubuntu build system from 14.04 to 16.04 (PR #677) Thanks @ExE-Boss
$GitPromptSettings.BeforeIndex
is always displayed even if there is nothing in the index. The intent of this separator setting is to provide a separator between the branch name / branch status and the following section of index/working/summary/stash indicators. (PR #723)- posh-git no longers sets missing
HOME
environment variable. (#718) (PR #722) Get-GitStatus -Force
now also overrides$GitPromptSettings.EnableFileStatus
as well as$GitPromptSettings.EnablePromptStatus
. (#657) (PR #721)
- Remove
.exe
suffix from PowerTab integration to enable PowerTab integration to work withgit
,git.cmd
orgit.exe
(#606) BranchBehindAndAheadDisplay
minimal/compact bug (#670) (PR #671)- Fix(status): Only reset changed colors (PR #673) Thanks @ExE-Boss
- Fix rebase step count (PR #674) Thanks Saša Kajfeš (@skajfes)
- Fix typo in cherry-pick parameters -
´continue
(PR #675) Thanks @KexyBiscuit - Prompt error in remote PSSession (#708) (PR #727
- Typos
- BREAKING: Removed SSH agent functionality from
posh-git
and put into another module focused solely on Git SSH support. See posh-sshell. (#338) (PR #585) - BREAKING: Removed
PoshGitTextSpan.CustomAnsi
property - now just put your custom VT sequences in thePoshGitTextSpan.Text
property. Be sure to terminate your VT sequences with"$([char]27)[0m"
or"`e[0m"
on PowerShell Core. (PR #616)
- Added
Remove-GitBranch
command. Partially addresses #79. These commands currently only delete local branches. (#79) (PR #663) - Added support for vsts-cli Git integration. (#549) (PR #581) Thanks David Gardiner (@flcdrg)
- Enhance prompt function to show username/hostname in SSH connection. Adds
Get-PromptConnectionInfo
command. (#591) (PR #595) - Show Rebase Progress (plus
|REVERTING
). (#102) (PR #599) - Set
$Env:COLUMNS
on prompt if necessary. (PR #607) - Tab-completion for
git log --stat
,git log --patch
andgit diff --staged
. (PR #620) Thanks Vasily Korytov (@chillum) - Tab-completion for
git update-git-for-windows
on Windows Git >= 2.16.2. (PR #642) New-GitPromptSettings
to provide an easy way to create aPoshGitPromptSettings
object which can be used to reset to the default settings. (PR #659)
- Eliminate traiing
=
on the tab-completion of--force-with-lease=
. (PR #622) Thanks Chuck Lu (@chucklu) - Expand
PathStatusSeparator
string when composing prompt. This allows you to use string interpolation in the$GitPromptSettings.PathStatusSeparator.Text
setting. (PR #630) Thanks Jason Shirk (@lzybkr)
WindowTitle
set by user overwritten by module. No longer updates Window title ifWindowTitle
setting set to$null
. (#594) (PR #597)Write-VcsStatus
behaving differently. WhenAnsiConsole -eq $false
,Write-VcsStatus
must not emit any strings. (#612) (PR #617)- On Windows PowerShell, defer
Add-Type
untilSet-ConsoleMode
executed. This improves module load time. (#637) (PR #638) (PR #662) - How do you manually install this? Added manual instructions for git clone of posh-git to README.md. (#648) (PR #649) Thanks Kyle Spier-Swenson (@MrStonedOne)
The 1.0.0 release is targeted specifically at Windows PowerShell 5.x and (cross-platform) PowerShell Core 6.x, both of
which support classes, enabling the enhanced structure of $GitPromptSettings
,
and writing prompt strings using ANSI escape sequences /
Console Virtual Terminal Sequences (supported since Windows 10 version 1511).
Consequently, this release introduces BREAKING changes with 0.x. If you are still on Windows PowerShell 2.0, 3.0 or 4.0, please continue to use the 0.x version of posh-git.
- Renamed
$GitPromptSettings
valuesBeforeText
toBeforeStatus
DelimText
toDelimStatus
AfterText
toAfterStatus
BeforeIndexText
toBeforeIndex
BeforeStashText
toBeforeStash
AfterStashText
toAfterStash
- Split
$GirPromptSettings.DefaultPromptSuffix
and$GitPromptSettings.DefaultPromptDebugSuffix
into:DefaultPromptBeforeSuffix
(''
)DefaultPromptDebug
(' [DBG]:'
), which is rendered if a debugger is attachedDefaultPromptSuffix
('$(">" * ($nestedPromptLevel + 1)) '
), which is rendered last (or returned fromprompt
, for terminals that don't support escape sequences)
- Renamed
$GitPromptSettings.EnableWindowTitle
to$GitPromptSettings.WindowTitle
with significant improvements:$Host.UI.RawUI.WindowTitle
is now set on everyprompt
, not just when inside a Git repo.- To prevent setting
WindowTitle
, set$GitPromptSettigs.WindowTitle
to$null
. - The
WindowTitle
update has been moved from theWrite-GitStatus
command to the built-inprompt
function. $GitPromptSettings.WindowTitle
is now fully customizable:- As a
string
, it will be processed withExpandString
. - As a
ScriptBlock
(default), it will be executed with two parameters:$GitStatus
and$IsAdmin
.
- As a
- When a color setting is specified by a
string
(color name), it is parsed as an HTML color (on platforms that supportSystem.Drawing.ColorTranslator
) before being parsed as aConsoleColor
. To force usingConsoleColors
, use static member syntax (e.g.[ConsoleColor]::Cyan
). (PR #536) PoshGitVcsPrompt
errors now show details if$GitPromptSettings.Debug
(PR #560)
- New command
Get-PromptPath
which formats the path displayed in the prompt and window title. This command honors$GitPromptSettings.DefaultPromptAbbreviateHomeDirectory
.- A path exactly matching
$HOME
is now shown in full, rather than abbreviated to~
(PR #567)
- A path exactly matching
- New
$GitPromptSettings
values (default):PathStatusSeparator
(DefaultPromptPath
('$(Get-PromptPath)'
)DefaultPromptWriteStatusFirst
($false
)DefaultPromptTimingFormat
(' {0}ms'
)
RepoName
property has been addded to the$global:GitStatus
object returned byGet-GitStatus
.- Added
$GitPromptSettings.UntrackedFilesMode
; accepted values are$null
(inheritstatus.showUntrackedFiles
), "all", "no", and "normal" (#556) (PR #557) Thanks David Snedecor (@TheSned) - Exported
Expand-GitCommand
for use with custom tab expansion (#562) (PR #563)
- Fixed
$GitPromptSettings.EnablePromptStatus
should not affectGet-GitStatus
by adding-Force
parameter. (#475) (PR #535) - Fixed PowerShell Core bug where we were using
Get-Content -Encoding Byte
when processing profile scripts during Chocolatey install/uninstall. That encoding doesn't exist in PowerShell Core. Switched toGet-Content -AsByteStream
on PowerShell Core. (PR #532) - Fixed ANSI rendering bug: when both
ForegroundColor
andBackgroundColor
colors are$null
(default), we were emitting an unnecessary terminating escape sequence"$([char]27)[0m"
. (PR #532) - Fixed issue where setting
ForegroundColor
orBackgroundColor
to 0 (Black) rendered the default color instead. - Updated Git subcommand lists (#561) (PR #571)
- Drop support for PowerShell 2.0 (#163) (PR #427)
- Drop support for PowerShell 3.0 and 4.0 (#328) (PR #513)
- Remove public
Enable-GitColors
,Get-AliasPattern
,Get-GitBranch
andInvoke-NullCoalescing
and its??
alias (#93) (PR #427)
-
Changed the
$GitPromptSettings
hashtable to a stongly typed object. Here is one example of the impact of this change:$GitPromptSettings.LocalWorkingStatusSymbol = '#' $GitPromptSettings.LocalWorkingStatusForegroundColor = [ConsoleColor]::DarkRed
Changes to:
$GitPromptSettings.LocalWorkingStatusSymbol.Text = '#' $GitPromptSettings.LocalWorkingStatusSymbol.ForegroundColor = [ConsoleColor]::DarkRed
-
Changed
Write-VcsStatus
,Write-GitStatus
andWrite-Prompt
to return a string rather than write to host when the host supports ANSI escape sequences.
- Implement support for ANSI escape sequences for colored output - support System.ConsoleColor, System.Drawing.HtmlColor
(if available on the platform) and 24-bit color. NOTE: this is a breaking change since
Write-VcsStatus
,Write-GitStatus
andWrite-Prompt
will now return a string rather than write to the host when the host supports ANSI escape sequences. (#304) (#447) (#455) - $GitPromptSettings is now a strongly typed object using PS classes (#344) (PR #513)
- Provide more granular commands than just
Write-GitStatus
. (#345) (PR #513) We now export the commands thatWrite-GitStatus
uses internally which are:- Write-GitBranchName
- Write-GitBranchStatus
- Write-GitIndexStatus
- Write-GitStashCount
- Write-GitWorkingDirStatus
- Write-GitWorkingDirStatusSummary
- Fixed Get-AuthenticodeSignature not on PS Core. (PR #487)
- Provide DefaultPromptPrefixColor and DefaultPromptSuffixColor options (#474) (PR #520)
- Fixed posh-git prompt makes PowerShell transcripts less readable (#282) (PR #447)
-
posh-git now exports the variable
$GitPromptScriptBlock
which contains the code for the default prompt. (#501) (PR #513)If you need to execute your own logic in your own prompt function but still want to display the default posh-git prompt, you can execute this scriptblock from your prompt function e.g.:
# profile.ps1 function prompt { Set-NodeVersion &$GitPromptScriptBlock } Import-Module posh-git
-
Fixed 'Write-Prompt' to be able use Black as foreground color. (#470) (PR #468) Thanks Vladimir Poleh (@vladimir-poleh)
-
Pass "git.exe" instead of "git" to Get-Command. (PR #478) (PR #479) Thanks Mike Sigsworth (@mikesigs)
-
Squash ssh agent warnings if
-Quiet
. (PR #484) Thanks Refael Ackermann (@refack) -
Fixed directory names that contain [brackets] cause GitPrompt to fail. (PR #502) Thanks Duncan Smart (@duncansmart)
-
Added
Add-PoshGitToProfile -AllUsers
support (PR #504) -
Fixed duplicated branch completion for git checkout (#505) (PR #506) (PR #512) Thanks Christoph Bergmeister (@bergmeister)
-
Fixed PSScriptAnalyzer warnings in the source (PR #509) Thanks Christoph Bergmeister (@bergmeister)
-
Fixed errors added to $Error collection by
Get-GitStatus
command (#500) (PR #514) -
Clean up wording for work dir local status in help file (PR #516)
-
Added
$GitPromptSettings.AdminTitlePrefixText
(default:'Administrator: '
) (#537) (PR #538) Thanks Eric Jorgensen (@nebosite) -
Added
$GitPromptSettings.UntrackedFilesMode
; accepted values are$null
(inheritstatus.showUntrackedFiles
), "all", "no", and "normal" (#556) (PR #557) Thanks David Snedecor (@TheSned) -
PoshGitVcsPrompt
errors now show details if$GitPromptSettings.Debug
(PR #560) -
Exported
Expand-GitCommand
for use with custom tab expansion (#562) (PR #563) -
Add code coverage to Coveralls.io (#416) (PR #461) Thanks Jan De Dobbeleer (@JanJoris)
- Fixed tab completion issues with duplicate aliases (#164) (#421) (PR #422)
Add-PoshGitToProfile
will no longer modify a signed$PROFILE
script; it also learned-Confirm
(PR #428)- Overwrite pre-0.7 posh-git prompt on import (PR #425)
- Fix Chocolatey deprecation warning with dependency on 0.9.10 (PR #426)
- Don't rerun Pageant if there are no keys to add (PR #441)
- Improve (and hide for Chocolatey) profile.example.ps1 deprecation messaging (#442) (PR #444)
- Quote tab completion for remote names containing special characters (PR #446)
- Fix signed $PROFILE detection for PowerShell v2 (#448) (PR #450)
- Create $PROFILE parent directory if missing (PR #449) (PR #452)
- Add -verbose parameter to install.ps1 (PR #451)
- Write-Prompt now correctly handles $null color parameters; the prompt now also uses DefaultForegroundColor when appropriate (PR #454)
- Add error handling to Write-GitStatus (PR #170) (PR #453)
This release has focused on improving the "getting started" experience by adding an Add-PoshGitToProfile
command that
modifies the user's PowerShell profile script to import the posh-git module whenever PowerShell starts.
When posh-git is imported, it will automatically install a posh-git prompt that displays Git status summary information.
Work was also done to improve performance of Get-GitStatus
when inside large Git repositories.
Work was begun to eliminate some obvious crashes on PowerShell on .NET Core but more work remains to be done.
- Performance of
Get-GitStatus
on large repos has been improved (PR #319) - Fix prompt and tab completion with non-ASCII characters (#64) (PR #223) (PR #359) (#374) (#389) (PR #397) (PR #403)
- Fix incorrect tab expansion for
git push --option <remote>
(#234) (PR #379) - Fix support for bare repository (#291) (PR #370)
- Fix syntax error on setenv calls (PR #297)
- Fix temp path issue with ~ in 8.3 filenames (#298) (PR #299)
- Fix problem on open source PowerShell, missing
WindowsPrincipal
/WindowsIdentity
(#301) (PR #312) - Fix/simplify Chocolatey install and add uninstall (#358)
- Remove invalid branch from tab expansion when
HEAD
is detached (PR #367) - Fix PowerShell Core error on
EnvironmentVariableTarget
(#317) (#369) (PR #318) - Fewer errors generated in global
$Error
collection (PR #370) - Remove error thrown by
git symbolic-ref
andgit describe
(PR #307) - Export command Write-VcsStatus to improve module auto-loading (PR #284)
- Update module import so that it sets the prompt function iff the user does not have a customized prompt function (#217) (PR #349)
- Update profile.example.ps1 to remove prompt function and tweak how module is imported (PR #349)
- Add tab completion for AVH git-flow commands (PR #231)
- Add new commmand Add-PoshGitToProfile (PR #361)
- Add about_posh-git help topic (PR #298)
- Add new settings for default posh-git prompt:
- Add ahead/behind count to prompt
(PR #256)
- Add
BranchBehindAndAheadDisplay
setting to control count display (Full (default), Compact, Minimal)
- Add
- Fix empty
Git-SshPath
issue (PR #268) - Add new settings for prompt status summary text:
FileAddedText
,FileModifiedText
,FileRemovedText
andFileConflictText
(PR #277) - Add tags to 'push' tab-completion (PR #286)
- Add new branch status to indicate upstream is gone (PR #326)
- Add tab completion support for shorthand force-push syntax (
git push <remote> +<tab>
) (#173) (PR #174) (PR #343) - Add tab completion of unique remote branch names for
git checkout <tab>
(#177) (PR #251) (PR #352) - Add
git worktree
tab completion (PR #366) - Add alias support for TortoiseGit commands (PR #394)
- Add support for tab-completion of Git parameters, long and short (PR #395)
- Switch
$GitPromptSettings
type fromPSObject
toPSCustomObject
. On PowerShell v5 and higher, this preserves the definition order of properties in$GitPromptSettings
making it easier to find properties. - Fix prompt status in worktree (#407) (PR #408)
- Quote tab completion for items containing special characters (#293) (PR #413)
Thank you to the following folks who contributed their time and scripting skills to make posh-git better:
- Keith Hill (@rkeithhill)
- Pester test infrastructure
- Triage of open issues and PRs
- Many README and help improvements
- Many of the fixes enumerated above
- Marcus Reid (@cmarcusreid)
- Use GitStatusCache when it's installed (PR #208)
- Report UpstreamGone from GitStatusCache response (PR #372)
- Jason Shirk (@lzybkr)
- Ralf Müller (@seamlessintegrations)
- Add support for tab-completion of Git parameters (PR #395)
- Aksel Kvitberg (@Flueworks)
- Add Worktree tab completion (PR #366)
- Eric Amodio (@eamodio)
- Add aliasing support for TortoiseGit commands (PR #394)
- Kevin Shaw (@shawmanz32na)
- Add DefaultPromptAbbreviateHomeDirectory setting (PR #387)
- KanjiBates (@KanjiBates)
- Fix link to git-scm.com in README.md (PR #396)
- Joel Rowley (@hjoelr)
- Fix syntax error on setenv calls (PR #297)
- Hui Sun (@JimAmuro)
- Josh (@joshgo)
- Add tags to 'push' tab-completion (PR #286)
- Rebecca Turner (@9999years)
- Add new settings for prompt FileAddedText, FileModifiedText, FileRemovedText and FileConflictText (PR #277)
- Jack (@Jackbennett)
- Export command Write-VcsStatus to improve module auto-loading (PR #284)
- Brendan Forster (@shiftkey)
- Paul Marston (@paulmarsy)
- INOMATA Kentaro (@matarillo)
- Fix branch names using UTF8 characters do not display correctly (PR #223)
- Luis Vita (@Ivita)
- Fix typo in git commit parameter --amend in tab exansion (PR #405)
- Skeept (@skeept)
- Fix debug prompt breaking posh-git prompt on PowerShell v4 (PR #406)
- @theaquamarine
- Jan De Dobbeleer (@JanJoris)
- Remove errors thrown by
git symbolic-ref
andgit describe
(PR #307)
- Remove errors thrown by
- Dan Smith (@dozius)
- Add tab completion for AVH git-flow commands (PR #231)
- @drawfour
- Add ahead/behind count to prompt (PR #256)
- Dan Turner (@dan-turner)
- Add tab completion support for shorthand force-push syntax (
git push <remote> +<tab>
) (PR #174)
- Add tab completion support for shorthand force-push syntax (
- Mark Hillebrand (@mah)
- Add tab completion of unique remote branch names for
git checkout <tab>
(PR #251)
- Add tab completion of unique remote branch names for
- Jeff Yates (@somewhatabstract)
- Don't rerun Pageant if there are no keys to add (PR #441)
- Tolga Balci (@tolgabalci)