Forge GitLab de l'IN2P3
Version 17 (Samantha Saidi, 13/04/2017 09:48)
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 | 17 | Samantha Saidi | > chercher le groupe "umr-triangle" ses projets |
14 | 10 | Samantha Saidi | |
15 | 1 | Samantha Saidi | |
16 | 1 | Samantha Saidi | h3. Première initialisation du répertoire (déjà fait, ne pas refaire) |
17 | 1 | Samantha Saidi | |
18 | 15 | Samantha Saidi | Clef SSH : |
19 | 15 | Samantha Saidi | |
20 | 2 | 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 ) |
21 | 1 | Samantha Saidi | |
22 | 15 | Samantha Saidi | Projet : |
23 | 15 | Samantha Saidi | |
24 | 3 | Samantha Saidi | > Créer un projet sur gitLab, par exemple umr-triangle (nom du groupe) / monprojet (nom du projet) |
25 | 1 | Samantha Saidi | |
26 | 2 | Samantha Saidi | > Copier l'url du dépôt proposé : git@gitlab.in2p3.fr:umr-triangle/monprojet.git |
27 | 2 | Samantha Saidi | |
28 | 15 | Samantha Saidi | En local, préparation du clone : |
29 | 15 | Samantha Saidi | |
30 | 2 | Samantha Saidi | > Créer / définir un dossier de dépôt sur son ordi, vide : par exemple : /Users/ssaidi/Documents/site-web/depot-gitlab/ |
31 | 1 | Samantha Saidi | |
32 | 15 | Samantha Saidi | > Ouvrir un terminal aller dans ce dossier vide : |
33 | 2 | Samantha Saidi | |
34 | 1 | Samantha Saidi | > <pre> cd /Users/ssaidi/Documents/site-web/depot-gitlab</pre> |
35 | 12 | Samantha Saidi | |
36 | 2 | Samantha Saidi | > <pre>git clone git@gitlab.in2p3.fr:umr-triangle/monprojet.git</pre> |
37 | 1 | Samantha Saidi | |
38 | 1 | Samantha Saidi | > Depuis mon navigateur de fichier copier le contenu de mes dossiers dans dossier vide |
39 | 1 | Samantha Saidi | |
40 | 15 | Samantha Saidi | > Dans le terminal je me déplace dans le dossier créé par le clone du projet distant en local : |
41 | 1 | Samantha Saidi | |
42 | 1 | Samantha Saidi | > <pre>cd monprojet</pre> |
43 | 15 | Samantha Saidi | |
44 | 15 | Samantha Saidi | Remplir le dossier local, la zone d'index, le dépôt local, puis le dépôt distant : |
45 | 3 | Samantha Saidi | |
46 | 3 | Samantha Saidi | > Je vérifie le statut de mon dépôt : |
47 | 3 | Samantha Saidi | |
48 | 1 | Samantha Saidi | > <pre>git status</pre> |
49 | 1 | Samantha Saidi | |
50 | 16 | Samantha Saidi | > Je charge tous mes nouveaux fichiers pour la zone d'index : |
51 | 3 | Samantha Saidi | |
52 | 1 | Samantha Saidi | > <pre>git add --all</pre> |
53 | 1 | Samantha Saidi | |
54 | 16 | Samantha Saidi | > Je les balance sur mon dépôt git local : |
55 | 3 | Samantha Saidi | |
56 | 1 | Samantha Saidi | > <pre>git commit -m"ajout initial des dossiers"</pre> |
57 | 3 | Samantha Saidi | |
58 | 3 | Samantha Saidi | > Je les balance sur mon dépôt git distant : |
59 | 1 | Samantha Saidi | |
60 | 1 | Samantha Saidi | > <pre>git push</pre> |
61 | 1 | Samantha Saidi | |
62 | 13 | Samantha Saidi | Pour bien comprendre la différence entre add, commit et push cf. graphique : |
63 | 14 | Samantha Saidi | !http://forge.cbp.ens-lyon.fr/redmine/attachments/download/1826/git-worflow.png! |
64 | 13 | Samantha Saidi | |
65 | 1 | Samantha Saidi | h3. Comment modifier le répertoire (le dépôt) de ce projet ? |
66 | 1 | Samantha Saidi | |
67 | 11 | 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) |
68 | 1 | Samantha Saidi | |
69 | 4 | Samantha Saidi | > Créer / définir un dossier de dépôt sur son ordi, vide : par exemple : /Users/ssaidi/Documents/site-web/depot-gitlab |
70 | 1 | Samantha Saidi | |
71 | 1 | Samantha Saidi | > Puis depuis son ordi, ouvrir un terminal aller dans ce dossier vide : |
72 | 1 | Samantha Saidi | |
73 | 4 | Samantha Saidi | > <pre>cd /Users/ssaidi/Documents/site-web/depot-gitlab</pre> |
74 | 1 | Samantha Saidi | |
75 | 1 | Samantha Saidi | > cloner ici le répertoire distant du GitLab : |
76 | 1 | Samantha Saidi | |
77 | 4 | Samantha Saidi | > <pre>git clone git@gitlab.in2p3.fr:umr-triangle/monprojet.git</pre> |
78 | 1 | Samantha Saidi | |
79 | 1 | Samantha Saidi | > votre répertoire est maintenant un clone lié à votre répertoire distant sur GitLab in2p3 |
80 | 1 | Samantha Saidi | |
81 | 4 | Samantha Saidi | > Dans le terminal je me déplace dans le dossier créé par le clonage du projet distant en local : |
82 | 4 | Samantha Saidi | |
83 | 4 | Samantha Saidi | > <pre>cd monprojet</pre> |
84 | 4 | Samantha Saidi | |
85 | 1 | Samantha Saidi | > récupérer les fichiers depuis le répertoire distant : |
86 | 1 | Samantha Saidi | |
87 | 4 | Samantha Saidi | > <pre>git pull git@gitlab.in2p3.fr:umr-triangle/monprojet.git</pre> |
88 | 1 | Samantha Saidi | |
89 | 1 | Samantha Saidi | > <pre></pre> |