Browse code

Correction d'erreurs du vimrc

schardon authored on 21/04/2020 19:53:35
Showing 1 changed files
... ...
@@ -8,6 +8,7 @@ https://learngitbranching.js.org/?locale=fr_FR
8 8
 mkdir <projet>
9 9
 cd <projet>
10 10
 git init
11
+vim .git/description
11 12
 
12 13
 ** EVOLUTION **
13 14
 git add
Browse code

Remise au propre de vimrc, et docs vim et git

schardon authored on 20/04/2020 12:43:11
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,70 @@
1
+https://www.atlassian.com/git/tutorials/saving-changes/gitignore
2
+https://www.pierre-giraud.com/git-github-apprendre-cours/
3
+
4
+https://learngitbranching.js.org/?locale=fr_FR
5
+
6
+
7
+** INITIER UN DEPOT GIT **
8
+mkdir <projet>
9
+cd <projet>
10
+git init
11
+
12
+** EVOLUTION **
13
+git add
14
+git mv <fichier> <newfichier>
15
+git rm
16
+git status
17
+
18
+** REVENIR A LA VERSION DU DERNIER COMMIT **
19
+git reset HEAD <fichier>
20
+
21
+** COMMIT **
22
+git commit -m "info du commit"     -- Ne pas oublier de faire des git add sur toutes les modifs
23
+git commit -a    -- Pour ajouter automatiquement tous les fichiers modifiés sans git add
24
+git commit --amend
25
+
26
+** CLONE & REFRESH **
27
+git clone
28
+git fetch         -- Refresh uniquement
29
+git pull          -- Merge le refresh de l'origin avec mes modifs en local
30
+
31
+** BRANCHES **
32
+git branch <nombranche>       -- Creer la branche
33
+git checkout <nombranche>     -- Aller a la branche
34
+git merge <branch>            -- Fusionne la branche dans la branche courante (à faire avant : git co master)
35
+? récupérer les dernieres modifs d'une autre branche dans ma branche actuelle ?
36
+
37
+** TAG **
38
+git tag maVersion1 <commit-id>
39
+
40
+** INFOS **
41
+git log
42
+
43
+** TRAVAIL A DISTANCE **
44
+git clone <git distant> <repertoire local>     -- Récupérer le git distant en local
45
+git push / git push origin master              -- Transfert les modifs au git distant
46
+git pull / git pull origin master              -- Recupere les modifs du git distant
47
+
48
+
49
+
50
+** SPECIFIQUE : DEBUG **
51
+1. créer branche de debug : git branch debut; git checkout debug
52
+2. ajouter plein de "printf", commit -m "debug: printf" : git commit
53
+3. debuguer, commit : git commit -m "debug: fix"
54
+4. publier uniquement le "commit fix" dans la branche master : git co master; git cherry-pick <commit-id ou from-commit-id to-commit-id>
55
+
56
+
57
+
58
+
59
+
60
+** Infos d'utilisation des branches **
61
+
62
+Si tu fais une branche pour une évolution, dans ce cas là tu as 2 possibilités :
63
+- Tu fais un merge dans ta branche principale, donc tu garde ta branche d'evolution avec tous ces commit dessus
64
+- Tu fais un rebase dynamique en sélectionnant 1 commit en "Pick" et tous les autres commits de la branche évolution en "squash". Ca va donc te créer un seul nouveau commit dans ta branche principale qui est un condensé de ta branche d'évolution. Ta branche évolution n'est donc plus utile et tu peux la supprimer.
65
+
66
+La bonne pratique c'est :
67
+- si tu fais un merge d'une branche dans l'autre ça veut dire que tu veux garder les 2 branches pour de l'historique
68
+- si tu fais du rebase tu veux juste alléger ton historique et donc ne plus avoir ta branche d'évolution
69
+
70
+