< Back
Get-Repo
Post
NAME Get-Repo
SYNOPSIS
Gets the latest version of a particular repository from the upstream hosting provider.
SYNTAX
Get-Repo [-Repo] <String> [[-Service] <String>] [[-Branch] <String>] [[-Path] <String>] [-Reconfigure] [-Open]
[<CommonParameters>]
DESCRIPTION
Used to quickly acquire the latest version of a given repository from a remote hosting provider.
Will automatically execute a git clone operation if necessary, falling back to git pull if the
repository already exists locally.
PARAMETERS
-Repo <String>
The name of the repository which you would like to fetch.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Service <String>
The remote hosting provider from which you would like to fetch the repository.
Required? false
Position? 2
Default value $GitTool.Service
Accept pipeline input? false
Accept wildcard characters? false
-Branch <String>
The repository branch which you owuld like to checkout.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
The directory within which all of your repositories are stored. Defaults to the value of $GitTool.Directory
if not specified.
Required? false
Position? 4
Default value $GitTool.Directory
Accept pipeline input? false
Accept wildcard characters? false
-Reconfigure [<SwitchParameter>]
Whether you would like to reconfigure the local repository to use the updated remote address in situations
where that has changed.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Open [<SwitchParameter>]
Whether or not to open the repository once it has been fetched.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-Repo sierrasoftworks/git-tool
Synchronizing https://github.com/SierraSoftworks/git-tool
- Git URL: git@github.com:SierraSoftworks/git-tool.git
- Target: C:\\dev\\github.com\\SierraSoftworks\\git-tool
Running git pull
Already up to date.
Name Value
---- -----
WebURL https://github.com/SierraSoftworks/git-tool
Service github.com
Repo SierraSoftworks/git-tool
Path C:\\dev\\github.com\\SierraSoftworks\\git-tool
Exists True
GitURL git@github.com:SierraSoftworks/git-tool.git
RELATED LINKS
SYNOPSIS
Gets the latest version of a particular repository from the upstream hosting provider.
SYNTAX
Get-Repo [-Repo] <String> [[-Service] <String>] [[-Branch] <String>] [[-Path] <String>] [-Reconfigure] [-Open]
[<CommonParameters>]
DESCRIPTION
Used to quickly acquire the latest version of a given repository from a remote hosting provider.
Will automatically execute a git clone operation if necessary, falling back to git pull if the
repository already exists locally.
PARAMETERS
-Repo <String>
The name of the repository which you would like to fetch.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Service <String>
The remote hosting provider from which you would like to fetch the repository.
Required? false
Position? 2
Default value $GitTool.Service
Accept pipeline input? false
Accept wildcard characters? false
-Branch <String>
The repository branch which you owuld like to checkout.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
The directory within which all of your repositories are stored. Defaults to the value of $GitTool.Directory
if not specified.
Required? false
Position? 4
Default value $GitTool.Directory
Accept pipeline input? false
Accept wildcard characters? false
-Reconfigure [<SwitchParameter>]
Whether you would like to reconfigure the local repository to use the updated remote address in situations
where that has changed.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Open [<SwitchParameter>]
Whether or not to open the repository once it has been fetched.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-Repo sierrasoftworks/git-tool
Synchronizing https://github.com/SierraSoftworks/git-tool
- Git URL: git@github.com:SierraSoftworks/git-tool.git
- Target: C:\\dev\\github.com\\SierraSoftworks\\git-tool
Running git pull
Already up to date.
Name Value
---- -----
WebURL https://github.com/SierraSoftworks/git-tool
Service github.com
Repo SierraSoftworks/git-tool
Path C:\\dev\\github.com\\SierraSoftworks\\git-tool
Exists True
GitURL git@github.com:SierraSoftworks/git-tool.git
RELATED LINKS