Forge GitLab de l'IN2P3
Version 24 (Samantha Saidi, 14/04/2017 09:52)
1 | 1 | Samantha Saidi | h1. Forge GitLab de l'IN2P3 |
---|---|---|---|
2 | 1 | Samantha Saidi | |
3 | 1 | Samantha Saidi | h2. Forge GitLab de l'IN2P3 |
4 | 1 | Samantha Saidi | |
5 | 1 | Samantha Saidi | > aller sur https://gitlab.in2p3.fr/users/sign_in |
6 | 1 | Samantha Saidi | |
7 | 1 | Samantha Saidi | > cliquer en bas à droite sur sign in with "Shibboleth" |
8 | 1 | Samantha Saidi | |
9 | 10 | Samantha Saidi | > !http://forge.cbp.ens-lyon.fr/redmine/attachments/download/1824/seconnecter.png! |
10 | 1 | Samantha Saidi | |
11 | 1 | Samantha Saidi | > entrer son login /mot de passe habituel de son université (ex. ENS de Lyon) |
12 | 1 | Samantha Saidi | |
13 | 18 | Samantha Saidi | > chercher le groupe "umr-triangle" et ses projets |
14 | 10 | Samantha Saidi | |
15 | 22 | Samantha Saidi | h3. Créer un dépôt distant sur GitLab, et le lier à un dépôt local |
16 | 1 | Samantha Saidi | |
17 | 15 | Samantha Saidi | Clef SSH : |
18 | 15 | Samantha Saidi | |
19 | 20 | Samantha Saidi | > Créer une clef ssh un mot de passe ou une clef ssh sur son ordinateur (cf. "documentation du gitLab pas à pas":https://gitlab.in2p3.fr/cc-in2p3-atelier-git/enonce/blob/master/prerequis.md) |
20 | 1 | Samantha Saidi | |
21 | 15 | Samantha Saidi | Projet : |
22 | 15 | Samantha Saidi | |
23 | 3 | Samantha Saidi | > Créer un projet sur gitLab, par exemple umr-triangle (nom du groupe) / monprojet (nom du projet) |
24 | 1 | Samantha Saidi | |
25 | 21 | Samantha Saidi | > Copier l'url du dépôt proposé : <pre>git@gitlab.in2p3.fr:umr-triangle/monprojet.git</pre> |
26 | 2 | Samantha Saidi | |
27 | 15 | Samantha Saidi | En local, préparation du clone : |
28 | 15 | Samantha Saidi | |
29 | 24 | Samantha Saidi | > Définir un dossier de récupération du dépôt sur son ordi : par exemple : /Users/ssaidi/Documents/site-web/depot-gitlab/ |
30 | 1 | Samantha Saidi | |
31 | 22 | Samantha Saidi | > Ouvrir un terminal aller dans ce dossier : |
32 | 1 | Samantha Saidi | |
33 | 1 | Samantha Saidi | > <pre>cd /Users/ssaidi/Documents/site-web/depot-gitlab</pre> |
34 | 19 | Samantha Saidi | |
35 | 22 | Samantha Saidi | > Y cloner le dépôt distant (cette opération créera localement un dossier "monprojet" avec son contenu –ou vide s'il vient d'être créé sur gitla–) |
36 | 22 | Samantha Saidi | |
37 | 2 | Samantha Saidi | > <pre>git clone git@gitlab.in2p3.fr:umr-triangle/monprojet.git</pre> |
38 | 1 | Samantha Saidi | |
39 | 22 | Samantha Saidi | > Via mon explorateur de fichier je me déplace vers le dossier créé par le clone du projet distant en local : modifier des fichiers récupérés ou peupler le dossier vide des fichiers dont je souhaite faire un dépôt |
40 | 1 | Samantha Saidi | |
41 | 22 | Samantha Saidi | > Dans le terminal je me déplace vers le dossier créé par le clone du projet distant en local : |
42 | 1 | Samantha Saidi | |
43 | 1 | Samantha Saidi | > <pre>cd monprojet</pre> |
44 | 15 | Samantha Saidi | |
45 | 15 | Samantha Saidi | Remplir le dossier local, la zone d'index, le dépôt local, puis le dépôt distant : |
46 | 3 | Samantha Saidi | |
47 | 3 | Samantha Saidi | > Je vérifie le statut de mon dépôt : |
48 | 3 | Samantha Saidi | |
49 | 1 | Samantha Saidi | > <pre>git status</pre> |
50 | 1 | Samantha Saidi | |
51 | 16 | Samantha Saidi | > Je charge tous mes nouveaux fichiers pour la zone d'index : |
52 | 3 | Samantha Saidi | |
53 | 1 | Samantha Saidi | > <pre>git add --all</pre> |
54 | 1 | Samantha Saidi | |
55 | 16 | Samantha Saidi | > Je les balance sur mon dépôt git local : |
56 | 3 | Samantha Saidi | |
57 | 1 | Samantha Saidi | > <pre>git commit -m"ajout initial des dossiers"</pre> |
58 | 3 | Samantha Saidi | |
59 | 1 | Samantha Saidi | > Je les balance sur mon dépôt git distant : |
60 | 1 | Samantha Saidi | |
61 | 4 | Samantha Saidi | > <pre>git push</pre> |
62 | 4 | Samantha Saidi | |
63 | 23 | Samantha Saidi | h3. Récupérer des modifs présentes sur le dépôt distant : |
64 | 1 | Samantha Saidi | |
65 | 1 | Samantha Saidi | > <pre>git pull git@gitlab.in2p3.fr:umr-triangle/monprojet.git</pre> |
66 | 23 | Samantha Saidi | |
67 | 23 | Samantha Saidi | Pour bien comprendre la différence entre add, commit et push cf. graphique : |
68 | 23 | Samantha Saidi | !http://forge.cbp.ens-lyon.fr/redmine/attachments/download/1826/git-worflow.png! |