diff --git a/docs/GitRepositoryRegistration.md b/docs/GitRepositoryRegistration.md
index 83038b7..e31d51f 100644
--- a/docs/GitRepositoryRegistration.md
+++ b/docs/GitRepositoryRegistration.md
@@ -38,6 +38,19 @@ If the current directory is not in a git repo, a registration already exists by
`Get-GitRepoRegistration`
+Returns all currently registered git repositories, as well as their current branch.
+
+```pwsh
+PS D:/Repos/Project-a> Get-GitRepoRegistration
+
+Name Location CurrentBranch
+---- -------- -------------
+test-repo D:/Repos/Project-a main
+Project-a D:/Repos/Project-a main
+```
+
+The current branch is cached for 15 minutes for performance reasons so it may not be up to date if a git repo has recently had its branch changed.
+
## Show-GitRepoRegistration
`Show-GitRepoRegistration -Name string [-NoStack|-NoSetLocation]`
diff --git a/src/ModuleCore/Git/GitManager.cs b/src/ModuleCore/Git/GitManager.cs
index f301244..1312b03 100644
--- a/src/ModuleCore/Git/GitManager.cs
+++ b/src/ModuleCore/Git/GitManager.cs
@@ -167,6 +167,11 @@ public class GitManager
});
}
+ ///
+ /// Returns all currently registered git repositories, including additional information such as the git repositories
+ /// current branch.
+ ///
+ ///
public List ListRepos()
{
return _registrations.Select(x =>
@@ -301,6 +306,10 @@ public class GitManager
public string Location { get; set; } = null!;
+ ///
+ /// The current branch of the repository. This value is cached for 15 minutes after which it becomes stale and
+ /// will be refreshed on the next call to this property.
+ ///
public string CurrentBranch => GetCurrentBranch();
// TODO: not fully decided on if I want this feature or not, but keeping it in for now
diff --git a/src/PowershellModule/Git/Commands/GetGitRepoRegistrationCommand.cs b/src/PowershellModule/Git/Commands/GetGitRepoRegistrationCommand.cs
index c343c22..d1885ec 100644
--- a/src/PowershellModule/Git/Commands/GetGitRepoRegistrationCommand.cs
+++ b/src/PowershellModule/Git/Commands/GetGitRepoRegistrationCommand.cs
@@ -4,6 +4,9 @@ using ModuleCore.Git.Models;
namespace PowershellModule.Git.Commands;
+///
+/// Lists all currently registered git repositories, with additional information such as their current branch.
+///
[Cmdlet(VerbsCommon.Get, GitCommands.GitRepoRegistrationNoun)]
[OutputType(typeof(GitRegistration))]
public class GetGitRepoRegistrationCommand : PSCmdlet