From e2caa604c551408b12a20a8596bfd11d1bb0a493 Mon Sep 17 00:00:00 2001 From: Scott Date: Wed, 2 Sep 2026 11:19:00 +1000 Subject: [PATCH] docs(git-provider): Small documentation updates to verb usage and default behaviour for New-GitRepoRegistration --- docs/GitRepositoryRegistration.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/GitRepositoryRegistration.md b/docs/GitRepositoryRegistration.md index d679505..2ce24f0 100644 --- a/docs/GitRepositoryRegistration.md +++ b/docs/GitRepositoryRegistration.md @@ -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!