Skip to content

Commit 59de6a8

Browse files
routinethemanth
authored andcommitted
Apply commit from another repository (#124)
1 parent 814bafc commit 59de6a8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
141141
* [Alias: git undo](#alias-git-undo)
142142
* [Add object notes](#add-object-notes)
143143
* [Show all the git-notes](#show-all-the-git-notes)
144+
* [Apply commit from another repository](#apply-commit-from-another-repository)
144145

145146
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
146147
<!-- @doxie.inject end toc -->
@@ -954,5 +955,10 @@ git notes add -m 'Note on the previous commit....'
954955
git log --show-notes='*'
955956
```
956957

958+
## Apply commit from another repository
959+
```sh
960+
git --git-dir=<source-dir>/.git format-patch -k -1 --stdout <SHA1> | git am -3 -k
961+
```
962+
957963
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
958964
<!-- @doxie.inject end -->

tips.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,7 @@
411411
}, {
412412
"title": "Show all the git-notes",
413413
"tip": "git log --show-notes='*'"
414+
}, {
415+
"title": "Apply commit from another repository",
416+
"tip": "git --git-dir=<source-dir>/.git format-patch -k -1 --stdout <SHA1> | git am -3 -k"
414417
}]

0 commit comments

Comments
 (0)