French documentation on the use of git. It seems complete.
git clone --depth=3
will clone only the last 3 commits
À propos des différents rebase :
standard : synchroniser une branche par rapport à une autre
interactif : réécrire l'historique de la branche courante
onto : rattacher le premier commit d'une branche à la HEAD d'une autre branche
(shared by Riduidel : https://nicolas-delsaux.hd.free.fr/Shaarli/?TfMhpQ)
git merge-base branch1 branch2
will find the common ancestor commit of two branches.
Tip : check that only one commit is applied out of each command
git log branch1..common
git log branch2..common
- Cherry-pick the fix commit in a new branch (based on a common ancestor of the 2 branches) which will be then merged into them.
- Partial fix will be the same technique but the merge will be reverted in the feature branch before merging the feature branch in the master (see this)
Applying a range of commit in git : git cherry-pick fromCommit..ToCommit
Interactive cheatsheet with remise, working directory, index, local repository and remote repository columns
(from sebsauvage)
Well, the content is substantial
Related :
Improving the use of vim-fugitive of some shortcuts and command
GA = General availability (a release); should be very stable and feature complete
RC = Release candidate; probably feature complete and should be pretty stable - problems should be relatively rare and minor, but worth reporting to try to get them fixed for release.
M = Milestone build - probably not feature complete; should be vaguely stable (i.e. it's more than just a nightly snapshot) but may still have problems.
SR = Service Release (subsequent maintenance releases that come after major -RELEASE).
Créer des représentations graphiques de dépôt git.
- Rename your local branch
git branch -m old-name new-name
or simplygit branch -m new-name
for the current branch. - Delete the old-name remote branch and push the new-name local branch
git push origin old-name new-name
- Reset the upstream branch for the new-name local branch
git push origin -u new-name
Le glossaire de git avec les mot-clés / vocabulaire spécifique
Summary
--soft
change only the HEAD--mixed
(default) change the HEAD and the index--hard
change the HEAD, the index and the working directory
Utiliser ensemble git commit --fixup
et git rebase --autosquash
pour nettoyer rapidement son historique de commits.
De la lecture supplémentaire pour mieux comprendre
Le beau git rebase -i
qui fait le café, lorsque le café n'a pas été fait <3
Ça explique bien deux options de git add
:
- le mode interactif afin de sélectionner les fichiers à place dans la Staging Area avec l'option
-i
. - le mode partiel de
git add
qui permet d'inclure seulement certaine(s) portion(s) d'un fichier dans la Staging Area ( avec l'option-p
) <3