en-US/GitDrive.dll-Help.xml
|
<?xml version="1.0" encoding="utf-8"?>
<helpItems xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" schema="maml" xmlns="http://msh"> <command:command> <command:details> <command:name>New-GitDrive</command:name> <maml:description> <maml:para>Mounts a Git repository as a PSDrive.</maml:para> </maml:description> <command:verb>New</command:verb> <command:noun>GitDrive</command:noun> </command:details> <maml:description> <maml:para>Discovers the Git repository at the specified path (or current directory) and mounts it as a PSDrive. Use gcd (Set-GitLocation) for everyday use. New-GitDrive is useful when mounting multiple repositories with different drive names.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-GitDrive</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>PSDrive name. Default is "Git".</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Path to the Git repository. If omitted, uses the current directory. Subdirectories are accepted; the parent .git is discovered automatically.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>PSDrive name. Default is "Git".</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Path to the Git repository. If omitted, uses the current directory. Subdirectories are accepted; the parent .git is discovered automatically.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <dev:name>None</dev:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <dev:name>GitDrive.Provider.GitDriveInfo</dev:name> </dev:type> <maml:description> <maml:para>The mounted drive information.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>- Replaces an existing drive with the same name automatically - Supports Git worktrees</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1: Mount current directory ---------</maml:title> <maml:introduction> <maml:para>```powershell PS C:\MyRepo> New-GitDrive ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2: Mount with a custom drive name ---------</maml:title> <maml:introduction> <maml:para>```powershell PS C:\> New-GitDrive -Name PS -Path C:\MyProj\PowerShell PS C:\> dir PS:\master ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3: Mount multiple repositories ---------</maml:title> <maml:introduction> <maml:para>```powershell New-GitDrive -Name App -Path C:\MyProj\App New-GitDrive -Name Lib -Path C:\MyProj\Library dir App:\master dir Lib:\main ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Set-GitLocation</maml:linkText> <command:uri>Set-GitLocation.md</command:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>about_GitDrive</maml:linkText> <command:uri>about_GitDrive.md</command:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Set-GitLocation</command:name> <maml:description> <maml:para>Mounts a Git PSDrive and navigates to the current branch.</maml:para> </maml:description> <command:verb>Set</command:verb> <command:noun>GitLocation</command:noun> </command:details> <maml:description> <maml:para>Discovers the Git repository from the current directory, mounts a Git:\ drive if needed, and navigates to the current branch. If the drive is already mounted for the same repository, it simply navigates without remounting. Running from a different repository switches the drive.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-GitLocation</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>PSDrive name. Default is "Git".</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Target</maml:name> <maml:description> <maml:para>Branch name or commit SHA to navigate to. If omitted, navigates to the current branch. Forward slashes in branch names are converted to backslashes for path resolution.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>PSDrive name. Default is "Git".</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Target</maml:name> <maml:description> <maml:para>Branch name or commit SHA to navigate to. If omitted, navigates to the current branch. Forward slashes in branch names are converted to backslashes for path resolution.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <dev:name>None</dev:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <dev:name>None</dev:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>- Discovers .git from subdirectories automatically - Supports Git worktrees - Detached HEAD shows commit history only</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1: Navigate to current branch ---------</maml:title> <maml:introduction> <maml:para>```powershell PS C:\MyRepo> gcd PS Git:\master> ```</maml:para> <maml:para>Mounts the repository and navigates to the current branch (master).</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2: Navigate to a specific branch ---------</maml:title> <maml:introduction> <maml:para>```powershell PS C:\MyRepo> gcd feature/login PS Git:\master\feature\login> ```</maml:para> <maml:para>Mounts the drive and navigates directly to the specified branch path.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3: Switch to another repository ---------</maml:title> <maml:introduction> <maml:para>```powershell PS Git:\master> cd C:\OtherRepo PS C:\OtherRepo> gcd PS Git:\main> ```</maml:para> <maml:para>The Git:\ drive switches to the new repository.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>New-GitDrive</maml:linkText> <command:uri>New-GitDrive.md</command:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>about_GitDrive</maml:linkText> <command:uri>about_GitDrive.md</command:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |