docs(git-provider): Update Show-GitRepoRegistration

This commit is contained in:
Scott 2026-08-26 17:26:51 +10:00
commit 6550da8c99

View file

@ -1,6 +1,7 @@
# Git Repo Registration # Git Repo Registration
- all commands support `-debug` - all commands support `-debug`
- at its simpliest level these commands allow you to register a git repo against a simple name, and provide the ability to quickly pushd to a location
## New-GitRepoRegistration ## New-GitRepoRegistration
@ -55,9 +56,29 @@ The current branch is cached for 15 minutes for performance reasons so it may no
`Show-GitRepoRegistration -Name string [-NoStack|-NoPushLocation]` `Show-GitRepoRegistration -Name string [-NoStack|-NoPushLocation]`
Changes your location to the location of the git repo registered by the given `-Name`. If used without `-NoStack` or its alias `-NoPushLocation`, your original location will be preserved and can be returned to at any time via `Pop-Location`/`Popd`. Changes your location to the location of the git repo registered by the given `-Name` and your original location will be preserved and can be returned to at any time via `Pop-Location`/`Popd`. By default, this command is identical to calling
`pushd [repository directory]`.
Using `-NoStack`/`-NoPushLocation` will not push your current location onto the stack, and will behave the same as `cd`/`Set-Location`. Using `-NoStack`/`-NoPushLocation` will not push your current location onto the stack, and will behave the same as `cd [repository directory]`/`Set-Location [repository directory]`.
```pwsh
PS C:/> Show-GitRepoRegistration Project-a
PS D:/Repos/Project-a> Get-Location -stack
Path
----
C:\
PS D:/Repos/Project-a> cd ./build
PS D:/Repos/Project-a/Build> Get-Location -stack
Path
----
C:\
PS D:/Repos/Project-a/Build> popd
PS C:/>
```
## Remove-GitRepoRegistration ## Remove-GitRepoRegistration