From 59de6a8b8070c7720dfd50e6c5279429e993c21d Mon Sep 17 00:00:00 2001 From: Steve Bink Date: Wed, 28 Sep 2016 12:13:13 -0400 Subject: [PATCH] Apply commit from another repository (#124) --- README.md | 6 ++++++ tips.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index ca7e964..08fea5b 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Alias: git undo](#alias-git-undo) * [Add object notes](#add-object-notes) * [Show all the git-notes](#show-all-the-git-notes) +* [Apply commit from another repository](#apply-commit-from-another-repository) @@ -954,5 +955,10 @@ git notes add -m 'Note on the previous commit....' git log --show-notes='*' ``` +## Apply commit from another repository +```sh +git --git-dir=/.git format-patch -k -1 --stdout | git am -3 -k +``` + diff --git a/tips.json b/tips.json index 54bc4ef..89e877a 100644 --- a/tips.json +++ b/tips.json @@ -411,4 +411,7 @@ }, { "title": "Show all the git-notes", "tip": "git log --show-notes='*'" +}, { + "title": "Apply commit from another repository", + "tip": "git --git-dir=/.git format-patch -k -1 --stdout | git am -3 -k" }]