< Back
Sync-Repository
Post
NAME Sync-Repository
SYNOPSIS
Get latest on a specified git repository.
SYNTAX
Sync-Repository [-Name] <String[]> [-Path <String>] [-Reset] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Sync-Repository [-Name] <String[]> [-LiteralPath <String>] [-Reset] [-PassThru] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Get latest on a specified git repository, rebase all known remote tracking branches.
PARAMETERS
-Name <String[]>
repositories to get latest on
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Path <String>
path to repositories folder, ${global:AF4JMsrcPath} if not specified
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LiteralPath <String>
literal path to repositories folder, ${global:AF4JMsrcPath} if not specified
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Reset [<SwitchParameter>]
switch which when specified indicates that current changes should be reset instead of stashed before getting
latest and popped when done
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Indicates whether the output of this function should be the function input or nothing.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
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
The repository name.
OUTPUTS
Pipeline input, if -PassThru is $true; otherwise this function does not generate any output.
NOTES
Author: John Meyer, AF4JM
Copyright (c) John Meyer. Licensed under the MIT License.
https://github.com/af4jm/GitHelper/blob/master/LICENSE
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Sync-Repository -Name 'myRepo'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>'myRepo1','myRepo2','myRepo3' | Sync-Repo
RELATED LINKS
https://www.powershellgallery.com/packages/GitHelper/
https://github.com/af4jm/GitHelper/
SYNOPSIS
Get latest on a specified git repository.
SYNTAX
Sync-Repository [-Name] <String[]> [-Path <String>] [-Reset] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Sync-Repository [-Name] <String[]> [-LiteralPath <String>] [-Reset] [-PassThru] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Get latest on a specified git repository, rebase all known remote tracking branches.
PARAMETERS
-Name <String[]>
repositories to get latest on
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Path <String>
path to repositories folder, ${global:AF4JMsrcPath} if not specified
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LiteralPath <String>
literal path to repositories folder, ${global:AF4JMsrcPath} if not specified
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Reset [<SwitchParameter>]
switch which when specified indicates that current changes should be reset instead of stashed before getting
latest and popped when done
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Indicates whether the output of this function should be the function input or nothing.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
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
The repository name.
OUTPUTS
Pipeline input, if -PassThru is $true; otherwise this function does not generate any output.
NOTES
Author: John Meyer, AF4JM
Copyright (c) John Meyer. Licensed under the MIT License.
https://github.com/af4jm/GitHelper/blob/master/LICENSE
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Sync-Repository -Name 'myRepo'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>'myRepo1','myRepo2','myRepo3' | Sync-Repo
RELATED LINKS
https://www.powershellgallery.com/packages/GitHelper/
https://github.com/af4jm/GitHelper/