

Sono disponibili altri esempi AWS SDK nel repository [AWS Doc SDK](https://github.com/awsdocs/aws-doc-sdk-examples) Examples. GitHub 

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Utilizzare `GetBranch` con una CLI
<a name="codecommit_example_codecommit_GetBranch_section"></a>

Gli esempi di codice seguenti mostrano come utilizzare `GetBranch`.

------
#### [ CLI ]

**AWS CLI**  
**Come ottenere informazioni su una ramificazione**  
Questo esempio ottiene informazioni su una filiale in un AWS CodeCommit repository.  
Comando:  

```
aws codecommit get-branch --repository-name MyDemoRepo --branch-name MyNewBranch
```
Output:  

```
{
  "BranchInfo": {
        "commitID": "317f8570EXAMPLE",
                "branchName": "MyNewBranch"
  }
}
```
+  Per i dettagli sull'API, consulta [GetBranch AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-branch.html)*Command Reference.* 

------
#### [ PowerShell ]

**Strumenti per PowerShell V4**  
**Esempio 1: questo esempio ottiene informazioni sulla ramificazione specificata per il repository specificato.**  

```
Get-CCBranch -RepositoryName MyDemoRepo -BranchName MyNewBranch
```
**Output:**  

```
BranchName                              CommitId
----------                              --------
MyNewBranch                             7763222d...561fc9c9
```
+  Per i dettagli sull'API, vedere [GetBranch](https://docs.aws.amazon.com/powershell/v4/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V4). 

**Strumenti per V5 PowerShell **  
**Esempio 1: questo esempio ottiene informazioni sulla ramificazione specificata per il repository specificato.**  

```
Get-CCBranch -RepositoryName MyDemoRepo -BranchName MyNewBranch
```
**Output:**  

```
BranchName                              CommitId
----------                              --------
MyNewBranch                             7763222d...561fc9c9
```
+  Per i dettagli sull'API, vedere [GetBranch](https://docs.aws.amazon.com/powershell/v5/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V5). 

------