Piste :
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| prog:git [2022/01/19 18:24] – [copier la clé sur gitlab] cb | prog:git [2025/08/26 19:26] (Version actuelle) – cb | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Git ====== | ====== Git ====== | ||
| + | |||
| + | ===== Prérequis ===== | ||
| + | Dans windows il faut cliquer sur source control et download Git for Windows | ||
| ===== Marche à suivre pour création d'un projet en copiant le git en local ===== | ===== Marche à suivre pour création d'un projet en copiant le git en local ===== | ||
| il faut créer un dossier vide et y aller | il faut créer un dossier vide et y aller | ||
| Ligne 16: | Ligne 19: | ||
| git config --global user.name " | git config --global user.name " | ||
| git config --global user.email " | git config --global user.email " | ||
| + | git config --global init.defaultBranch <nom> | ||
| + | |||
| cd existing_folder | cd existing_folder | ||
| Ligne 26: | Ligne 31: | ||
| </ | </ | ||
| + | Push an existing forder | ||
| + | < | ||
| + | cd existing_folder | ||
| + | git init --initial-branch=main | ||
| + | git remote add origin git@gitlab.com: | ||
| + | git add . | ||
| + | git commit -m " | ||
| + | git push -u origin main | ||
| + | </ | ||
| Ligne 51: | Ligne 65: | ||
| + | ===== Changer d' | ||
| + | < | ||
| + | # voir les dépots distants actuels | ||
| + | git remote -v | ||
| + | # changement de dépot | ||
| + | git remote set-url origin git@url.com/ | ||
| + | </ | ||
| + | |||
| + | ===== supprimer des fichier ===== | ||
| + | < | ||
| + | git add -u | ||
| + | git commit -m " | ||
| + | git push | ||
| + | </ | ||
| [[prog: | [[prog: | ||