> 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/es/comandos-de-powershell/new-psugitsetting.md).

# New-PSUGitSetting

## SINOPSIS

Crea una nueva configuración de git para una aplicación de PowerShell Universal. Esta configuración se utiliza para configurar el repositorio git de la aplicación.

## SINTAXIS

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

## DESCRIPCIÓN

Crea una nueva configuración de git para una aplicación de PowerShell Universal. Esta configuración se utiliza para configurar el repositorio git de la aplicación.

## EJEMPLOS

### Ejemplo 1

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

Crea una configuración de git local para la aplicación llamada 'MyApp' con la rama establecida en 'main'.

### Ejemplo 2

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

Crea una configuración de git remota para la aplicación llamada 'MyApp' con la rama establecida en 'main' y el repositorio remoto establecido en '<https://www.example.com/repo.git>'.

## PARÁMETROS

### -AppToken

El AppToken que se utiliza para llamar a la API de gestión de PowerShell Universal. También puede llamar a Connect-PSUServer antes de ejecutar este cmdlet para establecer el AppToken para toda la sesión.

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

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

### -Branch

La rama del repositorio git que se va a utilizar. Puede cambiar de rama más tarde utilizando el 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

El nombre del servidor de PowerShell Universal al que conectarse.

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

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

### -Credential

La credencial utilizada para conectarse al servidor de 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

Si se debe utilizar un cliente git externo.

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

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

### -GitCredential

La credencial utilizada para conectarse al repositorio git.

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

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

### -Integrated

Si se debe utilizar la API de gestión integrada de PowerShell Universal.

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

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

### -Interval

El intervalo en segundos para comprobar si hay cambios en el repositorio git.

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

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

### -Mode

El modo de edición de 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

Una URL de proxy para utilizar con el repositorio git.

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

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

### -Remote

La URL del repositorio 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

El comportamiento de sincronización del repositorio git. Determina cómo se sincronizan los cambios entre los repositorios local y 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

Si se debe confiar en el certificado utilizado por el repositorio git.

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

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

### -UseDefaultCredentials

Si se deben utilizar las credenciales predeterminadas al conectarse a la API de gestión de PowerShell Universal.

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

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

### -Cookies

Reutiliza y conserva las cookies de autenticación para la sesión actual de PowerShell.

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

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

### CommonParameters

Este cmdlet admite los parámetros comunes: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable y -ProgressAction. Para obtener más información, consulte [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## ENTRADAS

### Ninguna

## SALIDAS

### System.Object

## NOTAS

## ENLACES RELACIONADOS


---

# 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/es/comandos-de-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.
