New-PSUGitSetting
SYNOPSIS
Creates a new git setting for a PowerShell Universal application. This setting is used to configure the git repository for the application.
SYNTAX
New-PSUGitSetting [-Branch <String>] [-Remote <String>] [-SyncBehavior <GitSyncBehavior>] [-ExternalGit]
[-Mode <GitMode>] [-Interval <Int32>] [-GitCredential <PSCredential>] [-ProxyUrl <String>]
[-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials]
[-Integrated] [-TrustCertificate] [-Cookies] [<CommonParameters>]DESCRIPTION
Creates a new git setting for a PowerShell Universal application. This setting is used to configure the git repository for the application.
EXAMPLES
Example 1
PS C:\> New-PSUGitSetting -Branch 'main' -Name 'MyApp'Creates a local git setting for the application named 'MyApp' with the branch set to 'main'.
Example 2
Creates a remote git setting for the application named 'MyApp' with the branch set to 'main' and the remote repository set to 'https://www.example.com/repo.git'.
PARAMETERS
-AppToken
The AppToken that is used for calling the PowerShell Universal Management API. You can also call Connect-PSUServer before calling this cmdlet to set the AppToken for the entire session.
-Branch
The branch of the git repository to use. You can switch branches later using the Set-PSUGitSetting cmdlet.
-ComputerName
The name of the PowerShell Universal server to connect to.
-Credential
The credential used to connect to the PowerShell Universal server.
-ExternalGit
Whether to use an external git client.
-GitCredential
The credential used to connect to the git repository.
-Integrated
Whether to use the integrated PowerShell Universal Management API.
-Interval
The interval in seconds to check for changes in the git repository.
-Mode
The git edit mode.
-ProxyUrl
A proxy URL to use for the git repository.
-Remote
The URL of the remote git repository.
-SyncBehavior
The sync behavior of the git repository. This determines how changes are synchronized between the local and remote repositories.
-TrustCertificate
Whether to trust the certificate used by the git repository.
-UseDefaultCredentials
Whether to use default credentials when connecting to the PowerShell Universal Management API.
-Cookies
Reuses and persists authentication cookies for the current PowerShell session.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.
INPUTS
None
OUTPUTS
System.Object
NOTES
RELATED LINKS
PERMISSIONS
The access token requires settings.git/create to run this cmdlet remotely.
Last updated
Was this helpful?