Apply commit from another repository (#124)

This commit is contained in:
Steve Bink 2016-09-28 12:13:13 -04:00 committed by hemanth.hm
parent 814bafcaa2
commit 59de6a8b80
2 changed files with 9 additions and 0 deletions

View File

@ -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)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -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=<source-dir>/.git format-patch -k -1 --stdout <SHA1> | git am -3 -k
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -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=<source-dir>/.git format-patch -k -1 --stdout <SHA1> | git am -3 -k"
}]