Git/Branches : Différence entre versions
De WikiOpenTruc
| Ligne 1 : | Ligne 1 : | ||
| + | |||
| + | * https://git-scm.com/book/fr/v2/Les-branches-avec-Git-Les-branches-en-bref | ||
| + | |||
Il n'y a pas vraiment moyen d'y couper ... | Il n'y a pas vraiment moyen d'y couper ... | ||
| Ligne 7 : | Ligne 10 : | ||
Une branche sert par exemple typiquement à un travail focalisé sur un fichier précis. | Une branche sert par exemple typiquement à un travail focalisé sur un fichier précis. | ||
| + | <br> | ||
| + | |||
| + | |||
| + | ==Exemple== | ||
| + | |||
| + | <pre> | ||
| + | $ git checkout -b prob53 | ||
| + | Switched to a new branch "prob53" | ||
| + | |||
| + | Cette commande est un raccourci pour : | ||
| + | $ git branch prob53 | ||
| + | $ git checkout prob53 | ||
| + | </pre> | ||
| − | + | <br> | |
Version du 9 juillet 2018 à 19:27
Il n'y a pas vraiment moyen d'y couper ...
Les branches sont un outil générique, utilisables de multiples manières. Il y a néanmoins des pratiques un peu standards qui émergent.
Une branche sert par exemple typiquement à un travail focalisé sur un fichier précis.
Exemple
$ git checkout -b prob53 Switched to a new branch "prob53" Cette commande est un raccourci pour : $ git branch prob53 $ git checkout prob53