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