|
@@ -8,51 +8,121 @@ output:
|
|
|
|
|
|
## Introduction
|
|
## Introduction
|
|
|
|
|
|
-git + serveur scosi
|
|
|
|
|
|
+### À qui s'adresse ce tutoriel ?
|
|
|
|
+- Objectif du tutoriel : apprendre à utiliser le logiciel git et le serveur
|
|
|
|
+ gogs mis en place par le SCOSI.
|
|
|
|
+- Pré-requis : utilisation basique d'un ordinateur.
|
|
|
|
+- Public visé : les développeurs au sens large (code latex, python, matlab, R,
|
|
|
|
+ java...)
|
|
|
|
|
|
-[http://git-scm.com](http://git-scm.com)
|
|
|
|
|
|
+### Qu'est-ce-que git et gogs ?
|
|
|
|
+- git : logiciel de journalisation de code source décentralisé (alternative à
|
|
|
|
+ mercurial, subversion, CVS...)
|
|
|
|
+- gogs : service d'hébergement de code source utilisable avec git (alternative
|
|
|
|
+ à github, bitbucket...)
|
|
|
|
+
|
|
|
|
+### Qu'est-ce-que git et gogs peuvent m'apporter ?
|
|
|
|
+- journalisation :
|
|
|
|
+- sauvegarde distante :
|
|
|
|
+- synchronisation :
|
|
|
|
+- travail en équipe :
|
|
|
|
+- projets publics ou privés :
|
|
|
|
+
|
|
|
|
+### Concepts de base
|
|
|
|
+
|
|
|
|
+commit, branche
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
+depot local / distant
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
* * * * *
|
|
* * * * *
|
|
|
|
|
|
## Installation et configuration
|
|
## Installation et configuration
|
|
|
|
|
|
-### Linux
|
|
|
|
|
|
+### Installation sous Linux
|
|
|
|
|
|
```
|
|
```
|
|
sudo apt-get install git
|
|
sudo apt-get install git
|
|
```
|
|
```
|
|
|
|
|
|
|
|
+interface graphique
|
|
|
|
+qgit
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+### Installation sous Windows
|
|
|
|
|
|
-### Windows
|
|
|
|
|
|
+[http://git-scm.com](http://git-scm.com)
|
|
|
|
|
|
|
|
|
|
|
|
+### Configuration
|
|
|
|
|
|
|
|
+```
|
|
|
|
+git config --global user.name <name>
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+git config --global user.email <email>
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+### Exercice
|
|
|
|
|
|
* * * * *
|
|
* * * * *
|
|
|
|
|
|
-## Dépôt local (journaliser son projet)
|
|
|
|
|
|
+## Dépôt local (journaliser mon projet)
|
|
|
|
|
|
init
|
|
init
|
|
-clone
|
|
|
|
.git
|
|
.git
|
|
|
|
+status
|
|
|
|
+add
|
|
|
|
+commit
|
|
|
|
+log
|
|
|
|
+clone
|
|
|
|
+
|
|
|
|
+head
|
|
|
|
+
|
|
|
|
+.gitignore
|
|
|
|
+
|
|
|
|
+conseil sur les fichiers générés et les fichiers de données
|
|
|
|
|
|
|
|
|
|
### Exercice
|
|
### Exercice
|
|
|
|
|
|
* * * * *
|
|
* * * * *
|
|
|
|
|
|
-## Dépôt distant (sauvegarder son projet sur un serveur)
|
|
|
|
|
|
+## Dépôt distant (sauvegarder mon projet sur un serveur)
|
|
|
|
+
|
|
|
|
+nouveau projet
|
|
|
|
+
|
|
|
|
+projet existant
|
|
|
|
+
|
|
|
|
+### Exercice
|
|
|
|
|
|
* * * * *
|
|
* * * * *
|
|
|
|
|
|
## Branches (travailler en équipe)
|
|
## Branches (travailler en équipe)
|
|
|
|
|
|
|
|
+### Exercice
|
|
|
|
+
|
|
* * * * *
|
|
* * * * *
|
|
|
|
|
|
## Forks (collaborer avec d'autres projets)
|
|
## Forks (collaborer avec d'autres projets)
|
|
|
|
|
|
|
|
+### Exercice
|
|
|
|
+
|
|
|
|
+* * * * *
|
|
|
|
+
|
|
|
|
+## Références
|
|
|
|
+
|
|
|
|
+https://www.atlassian.com/git/tutorials/
|
|
|
|
+
|
|
|
|
+http://git-scm.com/book/en/v2
|
|
|
|
+
|
|
* * * * *
|
|
* * * * *
|
|
|
|
|
|
Dernière mise à jour : 2016-03-05
|
|
Dernière mise à jour : 2016-03-05
|