apertus-v1-5-70b· unknown
from compar:IA French AI Arena
quelles sont les options de git branch ?
Private research annotation
Sign in to add a private research label or note.
- User
quelles sont les options de git branch ?
- Assistant
La commande
git branchest utilisée pour gérer les branches dans un dépôt Git. Voici les principales options et utilisations de cette commande :1. Listes les branches
bashgit branch- Action : Affiche la liste de toutes les branches (locale et distant).
- Sortie : Une liste de branches, avec la branche courante précédée d'un
*.
2. Création d'une nouvelle branche
bashgit branch <nom-de-la-branche>- Action : Crée une nouvelle branche locale basée sur la branche courante.
- Exemple :
git branch nouvelle-fonction
3. Création et bascule sur une nouvelle branche
bashgit checkout -b <nom-de-la-branche>- Action : Crée une nouvelle branche et bascule immédiatement dessus.
- Similaire à :
git branch <nom-de-la-branche> && git checkout <nom-de-la-branche>
4. Suppression d'une branche locale
bashgit branch -d <nom-de-la-branche>- Action : Supprime une branche locale si elle a été fusionnée dans la branche courante ou si elle est déjà poussée vers le dépôt distant.
- Option -D (force) :
git branch -D <nom-de-la-branche>supprime la branche même si elle n'a pas été fusionnée.
5. Suppression d'une branche distante
bashgit push origin --delete <nom-de-la-branche>- Action : Supprime une branche distante (par ex. sur GitHub, GitLab).
6. Rename d'une branche locale
bashgit branch -m <ancien-nom> <nouveau-nom>- Action : Renomme une branche locale.
7.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.