This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
2018_2019:s2:td:git [2019/03/16 18:23] blay [Introduction à GIT] |
2018_2019:s2:td:git [2019/03/16 18:56] blay [Introduction à GIT] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Introduction à GIT ====== | ====== Introduction à GIT ====== | ||
+ | |||
+ | ===== Définition de l'environnement ===== | ||
- Adresse de gitlab : https://git-iutinfo.unice.fr/ | - Adresse de gitlab : https://git-iutinfo.unice.fr/ | ||
- Vous désactivez la vérification SSL <code> git config --global http.sslVerify false </code> | - Vous désactivez la vérification SSL <code> git config --global http.sslVerify false </code> | ||
- | - Pour savoir qui commite : <code> | + | - Suivez les instructions du dépôt (si vous ne les voyez plus : [[2018_2019:s2:td:git:depot|2018_2019:s2:td:git:depot]] |
- | git config --global user.name "myusername" | + | |
- | git config --global user.email "monadresse@unice.fr" | + | |
- | </code> | + | |
Pour les étudiants qui utilisent leur ordi perso, il est possible que vous ayez besoin de, ouvrir un Git CMD en administrateur, puis taper la commande suivante: | Pour les étudiants qui utilisent leur ordi perso, il est possible que vous ayez besoin de, ouvrir un Git CMD en administrateur, puis taper la commande suivante: | ||
<code> git config --system --unset credential.helper</code> | <code> git config --system --unset credential.helper</code> | ||
- | |||
- | |||
- | |||
- | git config --global http.sslVerify false | ||
- | Et bien sûr pour savoir qui commite : | ||
- | |||
- | git config --global user.name "myusername" | ||
- | etc. | ||
- | Pour les étudiants qui utilisent leur ordi perso, il est possible que vous ayez besoin de, ouvrir un Git CMD en administrateur, puis taper la commande suivante: | ||
- | |||
- | git config --system --unset credential.helper` | ||
- | |||
- | Git global setup | ||
- | git config --global user.name "BLAY Mireille" | ||
- | git config --global user.email "mireille.blay@unice.fr" | ||
- | |||
- | Create a new repository | ||
- | git clone https://git-iutinfo.unice.fr/blay/ajeter.git | ||
- | cd ajeter | ||
- | touch README.md | ||
- | git add README.md | ||
- | git commit -m "add README" | ||
- | git push -u origin master | ||
- | |||
- | Existing folder | ||
- | cd existing_folder | ||
- | git init | ||
- | git remote add origin https://git-iutinfo.unice.fr/blay/ajeter.git | ||
- | git add . | ||
- | git commit -m "Initial commit" | ||
- | git push -u origin master | ||
- | |||
- | Existing Git repository | ||
- | cd existing_repo | ||
- | git remote rename origin old-origin | ||
- | git remote add origin https://git-iutinfo.unice.fr/blay/ajeter.git | ||
- | git push -u origin --all | ||
- | git push -u origin --tags | ||
- | |||