Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| technique:git:accueil [2019/09/19 19:25] – francoisa | technique:git:accueil [2024/04/02 15:08] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 15: | Ligne 15: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | |||
| + | ===== Aide ===== | ||
| + | |||
| + | pour avoir la liste des options/ | ||
| + | |||
| + | git help | ||
| + | |||
| + | git help -a | ||
| + | |||
| + | git help commande | ||
| + | |||
| + | git commande -h | ||
| + | |||
| + | </ | ||
| ===== Quelques commandes git de base ===== | ===== Quelques commandes git de base ===== | ||
| - | Initialisation d'un dossier utilisé pour git (permet de faire des commits)< | + | Initialisation d'un dossier utilisé pour git (permet de faire des commits) |
| + | |||
| + | < | ||
| git init dossier | git init dossier | ||
| + | |||
| </ | </ | ||
| Ligne 27: | Ligne 44: | ||
| git config --local user.name "Mon nom simplifié / pseudo" | git config --local user.name "Mon nom simplifié / pseudo" | ||
| git config --local user.email " | git config --local user.email " | ||
| + | |||
| </ | </ | ||
| Ligne 35: | Ligne 53: | ||
| git add dossier | git add dossier | ||
| git add . | git add . | ||
| + | |||
| </ | </ | ||
| Ligne 41: | Ligne 60: | ||
| < | < | ||
| git commit -m " | git commit -m " | ||
| + | |||
| </ | </ | ||
| Ligne 47: | Ligne 67: | ||
| < | < | ||
| git push | git push | ||
| + | |||
| </ | </ | ||
| Ligne 53: | Ligne 74: | ||
| < | < | ||
| git pull | git pull | ||
| + | |||
| </ | </ | ||
| Ligne 59: | Ligne 81: | ||
| < | < | ||
| git clone https:// | git clone https:// | ||
| + | |||
| </ | </ | ||
| Ligne 65: | Ligne 88: | ||
| < | < | ||
| git status | git status | ||
| + | |||
| </ | </ | ||
| Ligne 71: | Ligne 95: | ||
| < | < | ||
| git log | git log | ||
| + | |||
| </ | </ | ||
| Ligne 77: | Ligne 102: | ||
| < | < | ||
| git help / git help commande | git help / git help commande | ||
| + | |||
| </ | </ | ||
| Ligne 83: | Ligne 109: | ||
| < | < | ||
| git tag " | git tag " | ||
| + | |||
| </ | </ | ||
| + | |||
| ===== Branches et autres - à compléter avec détails ===== | ===== Branches et autres - à compléter avec détails ===== | ||
| Créer une autre branche et basculer dessus | Créer une autre branche et basculer dessus | ||
| - | git rm fichier-ou-dossier | + | < |
| + | git rm fichier-ou-dossier | ||
| - | git mv fichier-ou-dossier | + | git mv fichier-ou-dossier |
| git branch -b nouvellebranche | git branch -b nouvellebranche | ||
| - | git diff commit1 commit2 | + | git diff commit1 commit2 |
| git checkout | git checkout | ||
| Ligne 101: | Ligne 130: | ||
| git rebase | git rebase | ||
| + | |||
| + | </ | ||