Piste :
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
prog:git [2021/08/28 16:53] – modification externe 127.0.0.1 | prog:git [2024/04/03 14:04] (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 6: | Ligne 9: | ||
git pull https:// | git pull https:// | ||
</ | </ | ||
+ | |||
+ | |||
+ | Aller dans le répertoire .ssh | ||
+ | ouvrir un éditeur et copier le contenu. Copier dans | ||
+ | https:// | ||
===== Marche à suivre pour création d'un projet ===== | ===== Marche à suivre pour création d'un projet ===== | ||
Ligne 11: | 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 21: | 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 39: | Ligne 58: | ||
git push https:// | git push https:// | ||
+ | |||
+ | ===== copier la clé sur gitlab===== | ||
+ | Aller dans .ssh et avec un éditeur copier le contenu et le coller dans | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ===== Changer d' | ||
+ | < | ||
+ | # voir les dépots distants actuels | ||
+ | git remote -v | ||
+ | # changement de dépot | ||
+ | git remote set-url origin git@url.com/ | ||
+ | </ | ||
[[prog: | [[prog: |