1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-21 22:22:07 +02:00
tldr/pages.it/common/git-branch.md
2024-10-13 10:26:47 +02:00

28 lines
678 B
Markdown

# git branch
> Il principale comando Git per lavorare con i rami.
> Maggiori informazioni: <https://git-scm.com/docs/git-branch>.
- Elenca i rami locali. Il ramo corrente è evidenziato da un `*`:
`git branch`
- Elenca tutti i rami (locali e remoti):
`git branch -a`
- Crea un nuovo ramo a partire dal commit corrente:
`git branch {{nome_ramo}}`
- Crea un nuovo ramo a partire dal commit specificato:
`git branch {{nome_ramo}} {{hash_commit}}`
- Rinomina un ramo (non applicabile sul ramo corrente):
`git branch {{-m|--move}} {{vecchio_nome}} {{nuovo_nome}}`
- Cancella un ramo locale (non applicabile sul ramo corrente):
`git branch {{-d|--delete}} {{nome_ramo}}`