> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/it/comandi-powershell/new-psugitsetting.md).

# New-PSUGitSetting

## SINOSSI

Crea una nuova impostazione git per un'applicazione PowerShell Universal. Questa impostazione viene utilizzata per configurare il repository git per l'applicazione.

## SINTASSI

```
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>]
```

## DESCRIZIONE

Crea una nuova impostazione git per un'applicazione PowerShell Universal. Questa impostazione viene utilizzata per configurare il repository git per l'applicazione.

## ESEMPI

### Esempio 1

```powershell
PS C:\> New-PSUGitSetting -Branch 'main' -Name 'MyApp'
```

Crea un'impostazione git locale per l'applicazione denominata 'MyApp' con il branch impostato su 'main'.

### Esempio 2

```powershell
PS C:\> New-PSUGitSetting -Remote 'https://www.example.com/repo.git' -Branch 'main' -Name 'MyApp'
```

Crea un'impostazione git remota per l'applicazione denominata 'MyApp' con il branch impostato su 'main' e il repository remoto impostato su '<https://www.example.com/repo.git>'.

## PARAMETRI

### -AppToken

L'AppToken utilizzato per chiamare la PowerShell Universal Management API. È inoltre possibile chiamare Connect-PSUServer prima di eseguire questo cmdlet per impostare l'AppToken per l'intera sessione.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Branch

Il branch del repository git da utilizzare. È possibile cambiare branch in seguito utilizzando il cmdlet Set-PSUGitSetting.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ComputerName

Il nome del server PowerShell Universal a cui connettersi.

```yaml
Type: String
Parameter Sets: (All)
Aliases: Uri

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Credential

Le credenziali utilizzate per connettersi al server PowerShell Universal.

```yaml
Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ExternalGit

Indica se utilizzare un client git esterno.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -GitCredential

Le credenziali utilizzate per connettersi al repository git.

```yaml
Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Integrated

Indica se utilizzare la PowerShell Universal Management API integrata.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Interval

L'intervallo in secondi per verificare la presenza di modifiche nel repository git.

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Mode

La modalità di modifica git.

```yaml
Type: GitMode
Parameter Sets: (All)
Aliases:
Accepted values: Manual, Automatic

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ProxyUrl

Un URL proxy da utilizzare per il repository git.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Remote

L'URL del repository git remoto.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SyncBehavior

Il comportamento di sincronizzazione del repository git. Determina come le modifiche vengono sincronizzate tra i repository locale e remoto.

```yaml
Type: GitSyncBehavior
Parameter Sets: (All)
Aliases:
Accepted values: TwoWay, OneWay, PushOnly

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -TrustCertificate

Indica se considerare attendibile il certificato utilizzato dal repository git.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -UseDefaultCredentials

Indica se utilizzare le credenziali predefinite durante la connessione alla PowerShell Universal Management API.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Cookies

Riutilizza e mantiene i cookie di autenticazione per la sessione PowerShell corrente.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters

Questo cmdlet supporta i parametri comuni: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable e -ProgressAction. Per maggiori informazioni, veda [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUT

### Nessuno

## OUTPUT

### System.Object

## NOTE

## COLLEGAMENTI CORRELATI


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/it/comandi-powershell/new-psugitsetting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
