feat: Add GitRepoRegistration cmdlets #5
1 changed files with 9 additions and 3 deletions
docs(git-provider): Small documentation updates to verb usage and default behaviour for New-GitRepoRegistration
commit
e2caa604c5
|
|
@ -1,7 +1,11 @@
|
|||
# Git Repo Registration
|
||||
|
||||
- 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
|
||||
- at its simplest level these commands allow you to register a git repo against a simple name, and provide the ability to quickly pushd to a location
|
||||
|
||||
Most `*-GitRepoRegistration` commands are expected to be run within a folder that is contained within a git repo. The only exceptions to this are any verbs that list information or change locations such as `Get-`, `Show-`, `Push-`, `Pop-`.
|
||||
|
||||
Any exceptions to behaviours are outlined within the relevant command section
|
||||
|
||||
## New-GitRepoRegistration
|
||||
|
||||
|
|
@ -11,15 +15,17 @@ Creates a new registration for the current directory, optionally registering aga
|
|||
|
||||
Name registrations are _not_ case-sensitive, so registrations can be made using different cases for the same location, and multiple registrations can exist for the git repository.
|
||||
|
||||
If `New-GitRepoRegistration` is used in 2 repositories with the same name but different locations, the 2nd call will fail as a registration will already exist by name.
|
||||
|
||||
```pwsh
|
||||
# Default registration
|
||||
# Default registration without a name within a folder in a git repo
|
||||
PS D:/Repos/Project-a> New-GitRepoRegistration -debug
|
||||
DEBUG: Checking if current directory is a git repository...
|
||||
DEBUG: ...location is a git repo!
|
||||
DEBUG: No name given for registration, defaulting to git folder root.
|
||||
DEBUG: Registered 'D:/Repos/Project-a' to name 'Project-a'
|
||||
|
||||
# Named registration
|
||||
# Named registration
|
||||
PS D:/Repos/Project-a> New-GitRepoRegistration "test repo" -debug
|
||||
DEBUG: Checking if current directory is a git repository...
|
||||
DEBUG: ...location is a git repo!
|
||||
|
|
|
|||
Loading…
Reference in a new issue