Update Gestion de versions avec hébergement du dépôt sur un serveur GitLab, les bases authored by Sebastien Jean's avatar Sebastien Jean
......@@ -310,7 +310,7 @@ To https://gitlab.iut-valence.fr/jeans/gitlab-bases.git
La commande git log montre que le dépôt distant est à jour (pointeurs locaux et distants alignés sur le commit le plus récent) :
```plaintext
```bash
sebastienjean@MacBook-Air-749 gitlab-bases % git log
commit 425ba5e6883161f2c01aba66e7279b4aabddb5e7 (HEAD -> main, origin/main, origin/HEAD)
Author: sebastienjean <sebastien.jean@univ-grenoble-alpes.fr>
......@@ -326,45 +326,56 @@ Date: Sun Sep 25 07:18:39 2022 +0000
sebastienjean@MacBook-Air-749 gitlab-bases %
```
![](uploads/57dcbb31e0cbd6609a0b8af9c85fe030/GitPush4.png)
La commande git status le confirme :
```bash
sebastienjean@MacBook-Air-749 gitlab-bases % git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
```
La page du dépôt sur le serveur confirme également que le commit local a bien été synchronisé :
![03-gitlab-push](uploads/32103fe742087feffe50e264ccda22fe/03-gitlab-push.png)
A partir de cette étape, si on supprime complètement le dépôt local et que l'on reclone le dépôt distant, on récupérera bien l'intégralité de l'historique puisque le commit local a été transmis avec succès au serveur :
```bash
MacBook-Air-749:gitlab-basics sebastienjean$ pwd
/Users/sebastienjean/gitlab-basics
MacBook-Air-749:gitlab-basics sebastienjean$ cd ..
MacBook-Air-749:~ sebastienjean$ rm -rf gitlab-basics/
MacBook-Air-749:~ sebastienjean$ git clone https://gitlab.iut-valence.fr/jeans/gitlab-basics.git
Cloning into 'gitlab-basics'...
sebastienjean@MacBook-Air-749 gitlab-bases % cd ..
sebastienjean@MacBook-Air-749 ~ % rm -rf gitlab-bases
sebastienjean@MacBook-Air-749 ~ % git clone https://gitlab.iut-valence.fr/jeans/gitlab-bases.git
Cloning into 'gitlab-bases'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (6/6), done.
MacBook-Air-749:~ sebastienjean$ cd gitlab-basics/
MacBook-Air-749:gitlab-basics sebastienjean$ ls -al
total 16
drwxr-xr-x 5 sebastienjean staff 160 Jan 24 09:59 .
drwxr-xr-x@ 160 sebastienjean staff 5120 Jan 24 09:59 ..
drwxr-xr-x 12 sebastienjean staff 384 Jan 24 09:59 .git
-rw-r--r-- 1 sebastienjean staff 54 Jan 24 09:59 README.md
-rw-r--r-- 1 sebastienjean staff 19 Jan 24 09:59 unFichier.txt
MacBook-Air-749:gitlab-basics sebastienjean$ git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
MacBook-Air-749:gitlab-basics sebastienjean$ git log
commit deebe1462a849bdf6702b5d8064fcee2b479d9d6 (HEAD -> main, origin/main, origin/HEAD)
Author: sebastienjean <baz.jean@gmail.com>
Date: Sun Jan 23 21:31:04 2022 +0100
sebastienjean@MacBook-Air-749 ~ % cd gitlab-bases
sebastienjean@MacBook-Air-749 gitlab-bases % ls -al
total 24
drwxr-xr-x 5 sebastienjean staff 160 Sep 25 09:59 .
drwxr-xr-x@ 157 sebastienjean staff 5024 Sep 25 09:59 ..
drwxr-xr-x 12 sebastienjean staff 384 Sep 25 09:59 .git
-rw-r--r-- 1 sebastienjean staff 6223 Sep 25 09:59 README.md
-rw-r--r-- 1 sebastienjean staff 19 Sep 25 09:59 unFichier.txt
sebastienjean@MacBook-Air-749 gitlab-bases % git log
commit 425ba5e6883161f2c01aba66e7279b4aabddb5e7 (HEAD -> main, origin/main, origin/HEAD)
Author: sebastienjean <sebastien.jean@univ-grenoble-alpes.fr>
Date: Sun Sep 25 09:37:30 2022 +0200
ajout d'un fichier
commit fd7357b0eda5a17ed4b66b995751219f303a85cd
commit 23b7e5413195e7804fdd5bb7de4fb3efe1f63180
Author: Sebastien Jean <sebastien.jean@univ-grenoble-alpes.fr>
Date: Sun Jan 23 10:13:01 2022 +0000
Date: Sun Sep 25 07:18:39 2022 +0000
Initial commit
sebastienjean@MacBook-Air-749 gitlab-bases % git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
sebastienjean@MacBook-Air-749 gitlab-bases %
```
\ No newline at end of file