|
@@ -143,8 +143,7 @@ icalcomponent * getPtrIcal() const ;
|
|
|
|
|
|
## Créer un projet
|
|
|
|
|
|
-- à partir d'un projet existant : fork
|
|
|
-- nouveau projet : ![](github_nouveau_projet.png)
|
|
|
+![](github_nouveau_projet.png)
|
|
|
|
|
|
## Gestion des collaborateurs
|
|
|
|
|
@@ -169,7 +168,7 @@ icalcomponent * getPtrIcal() const ;
|
|
|
## Fermer un ticket
|
|
|
|
|
|
- via l'interface web
|
|
|
-- via les messages de commit : `close #1`
|
|
|
+- via les messages de commit : `mise en place du code, close #1`
|
|
|
|
|
|
![](github_issue_3.png)
|
|
|
|
|
@@ -240,7 +239,7 @@ git config --global core.editor emacs
|
|
|
git config --global http.proxy http://user:pass@proxyhost:proxyport
|
|
|
```
|
|
|
|
|
|
-## Quelques commandes git
|
|
|
+## Quelques commandes git (1)
|
|
|
|
|
|
---|---|
|
|
|
`git clone` | récupère un dépôt |
|
|
@@ -254,8 +253,18 @@ git config --global http.proxy http://user:pass@proxyhost:proxyport
|
|
|
`git log` | affiche la liste des commits |
|
|
|
`git diff` | affiche les modifications courantes (par rapport au dernier commit)|
|
|
|
`git checkout -- .` | supprime les modifications courantes (revient au commit) |
|
|
|
+
|
|
|
+## Quelques commandes git (2)
|
|
|
+
|
|
|
+---|---|
|
|
|
`git pull` | récupère les modifications du dépôt distant et les intègre dans le dépôt local |
|
|
|
`git push ` | envoie les commits du dépôt local sur le dépôt distant |
|
|
|
+`git branch` | affiche les branches locales |
|
|
|
+`git ls-remote` | affiche les branches distantes |
|
|
|
+`git branch <branche>` | crée une nouvelle branche |
|
|
|
+`git checkout <branche>` | change de branche |
|
|
|
+`git push -u origin <branche>` | envoie une nouvelle branche distante |
|
|
|
+`git merge <branche>` | fusionne une branche dans la branche courante |
|
|
|
|
|
|
## Quelques conseils
|
|
|
|
|
@@ -320,6 +329,95 @@ To https://juliendehos@github.com/juliendehos/projet_l3
|
|
|
bd1f597..eab4260 master -> master
|
|
|
```
|
|
|
|
|
|
+## Branches locales
|
|
|
+
|
|
|
+- créer une branche locale :
|
|
|
+
|
|
|
+```
|
|
|
+$ git branch proto2
|
|
|
+```
|
|
|
+
|
|
|
+- voir les branches locales :
|
|
|
+
|
|
|
+```
|
|
|
+$ git branch
|
|
|
+* master
|
|
|
+ proto2
|
|
|
+```
|
|
|
+
|
|
|
+- changer de branche :
|
|
|
+
|
|
|
+```
|
|
|
+$ git checkout proto2
|
|
|
+Basculement sur la branche 'proto2'
|
|
|
+```
|
|
|
+
|
|
|
+## Branches distantes
|
|
|
+
|
|
|
+- voir les branches distantes :
|
|
|
+
|
|
|
+```
|
|
|
+$ git ls-remote
|
|
|
+From https://juliendehos@github.com/juliendehos/projet_l3
|
|
|
+4fca7ad38b299acdb7453547d5c9fc1d2494e4cc HEAD
|
|
|
+4fca7ad38b299acdb7453547d5c9fc1d2494e4cc refs/heads/master
|
|
|
+```
|
|
|
+
|
|
|
+- envoyer une nouvelle branche sur le serveur `origin` :
|
|
|
+
|
|
|
+```
|
|
|
+$ git push -u origin proto2
|
|
|
+Password for 'https://juliendehos@github.com':
|
|
|
+Décompte des objets: 2, fait.
|
|
|
+Delta compression using up to 4 threads.
|
|
|
+Compression des objets: 100% (2/2), fait.
|
|
|
+Écriture des objets: 100% (2/2), 266 bytes | 0 bytes/s, fait.
|
|
|
+Total 2 (delta 0), reused 0 (delta 0)
|
|
|
+To https://github.com/juliendehos/projet_l3
|
|
|
+ * [new branch] proto2 -> proto2
|
|
|
+La branche proto2 est paramétrée pour suivre la branche distante proto2 depuis origin.
|
|
|
+```
|
|
|
+
|
|
|
+## Fusion de branches
|
|
|
+
|
|
|
+- exemple :
|
|
|
+
|
|
|
+```
|
|
|
+ -- B (proto2) -- B -- (proto2)
|
|
|
+ / -> / \
|
|
|
+A -- C (master) A -- C -- D (master)
|
|
|
+```
|
|
|
+
|
|
|
+- passer sur la branche qui doit recevoir la fusion :
|
|
|
+
|
|
|
+```
|
|
|
+$ git checkout master
|
|
|
+Basculement sur la branche 'master'
|
|
|
+```
|
|
|
+
|
|
|
+- fusionner :
|
|
|
+
|
|
|
+```
|
|
|
+$ git merge proto2
|
|
|
+Merge made by the 'recursive' strategy.
|
|
|
+ proto2.cpp | 0
|
|
|
+ 1 file changed, 0 insertions(+), 0 deletions(-)
|
|
|
+ create mode 100644 proto2.cpp
|
|
|
+```
|
|
|
+
|
|
|
+##
|
|
|
+
|
|
|
+- éventuellement, vérifier le log :
|
|
|
+
|
|
|
+```
|
|
|
+$ git log --oneline --decorate --graph
|
|
|
+* 82eb957 (HEAD, master) Merge branch 'proto2'
|
|
|
+|\
|
|
|
+| * e29caa2 (origin/proto2, proto2) début proto2
|
|
|
+* | 7c13fc0 modif proto1
|
|
|
+|/
|
|
|
+* 4fca7ad (origin/master) mise en place du code, close #1
|
|
|
+```
|
|
|
|
|
|
# Travail à réaliser
|
|
|
|