Files
tldr/pages.fr/common/git-worktree.md
2021-06-22 20:34:03 -04:00

21 lines
618 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/répertoire}} {{branche}}`
- Créer un nouvel arbre de travail avec une nouvelle branche :
`git worktree add {{chemin/vers/répertoire}} -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`