Files
tldr/pages.fr/common/git-worktree.md
2021-05-01 12:49:31 -04:00

21 lines
614 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# git worktree
> Gérer plusieurs arbres de travail attachés au même dépôt.
> Plus d'informations : <https://git-scm.com/docs/git-worktree>.
- Créer un nouvel arbre de travail avec une branche spécifiée :
`git worktree add {{chemin/vers/repertoire}} {{branche}}`
- Créer un nouvel arbre de travail avec une nouvelle branche :
`git worktree add {{chemin/vers/repertoire}} -b {{nouvelle_branche}}`
- Répertorier tous les arbres de travail attachés à ce dépôt :
`git worktree list`
- Supprimer les arbres de travail (après avoir supprimé les répertoires de travail) :
`git worktree prune`