From d899d9d9ce3e0ab823ca53812da1187c9caa48f5 Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Wed, 17 May 2023 14:11:35 +0200 Subject: [PATCH] Note GIT --- notes/git.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/notes/git.md b/notes/git.md index c98a53b..37ee27d 100644 --- a/notes/git.md +++ b/notes/git.md @@ -79,10 +79,22 @@ Lister les commits manquants sur la branche release par rapport à develop # la version one-liner git log --oneline --graph --decorate --abbrev-commit release..develop +Créer un patch à partir du dernier commit + + git format-patch -1 HEAD + +Créer un patch à partir d'un id de commit + + git format-patch -1 + Créer un patch à partir d'une suite de commits consécutifs git format-patch cc1dde0dd^..6de6d4b06 --stdout > foo.patch +Extraire un diff d'un commit + + git diff ^ > stash.diff + Restaurer un fichier pendant une phase de merge git checkout -m FILE