docs(git-provider): Document Remove-GitRepoRegistration
This commit is contained in:
parent
b91a868a54
commit
c8717df44a
1 changed files with 38 additions and 1 deletions
|
|
@ -83,3 +83,40 @@ PS C:/>
|
|||
## Remove-GitRepoRegistration
|
||||
|
||||
`Remove-GitRepoRegistration [-Name string]`
|
||||
|
||||
Removes a repo registration by the given name, or if no name is specified, attempts to remove the git repo registered by resolving the git repo.
|
||||
|
||||
If `Name` is not provided then the command must be run in a location that is a git repo and the registration to remove will use the parent git repo folder name. If `Name` _is_ provided this command can be executed from any location.
|
||||
|
||||
```pwsh
|
||||
# Default registration without a name within a folder in a git repo
|
||||
PS D:/Repos/Project-a> New-GitRepoRegistration
|
||||
|
||||
# List registrations
|
||||
PS D:/Repos/Project-a> Get-GitRepoRegistration
|
||||
|
||||
Name Location CurrentBranch
|
||||
---- -------- -------------
|
||||
Project-a D:/Repos/Project-a main
|
||||
Test-Repo D:/Repos/Project-a main
|
||||
|
||||
# Remove a registration from within a git repo
|
||||
PS D:/Repos/Project-a> Remove-GitRepoRegistration
|
||||
# No output indicates successful removal
|
||||
|
||||
PS D:/Repos/Project-a> Get-GitRepoRegistration
|
||||
|
||||
Name Location CurrentBranch
|
||||
---- -------- -------------
|
||||
Test-Repo D:/Repos/Project-a main
|
||||
|
||||
# Duplicate calls error if there is no registration
|
||||
PS D:/Repos/Project-a> Remove-GitRepoRegistration
|
||||
Remove-GitRepoRegistration: No registration exists for 'Project-a'.
|
||||
|
||||
# Debug output via named argument
|
||||
PS D:/Repos/Project-a> Remove-GitRepoRegistration -name Test-Repo -debug
|
||||
DEBUG: Checking if current directory is a git repository...
|
||||
DEBUG: ...location is a git repo!
|
||||
DEBUG: Removed Test-Repo.
|
||||
```
|
||||
Loading…
Reference in a new issue