mirror of
https://github.com/namibia/tips.git
synced 2025-01-23 15:18:29 +00:00
Apply commit from another repository (#124)
This commit is contained in:
parent
814bafcaa2
commit
59de6a8b80
@ -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)
|
* [Alias: git undo](#alias-git-undo)
|
||||||
* [Add object notes](#add-object-notes)
|
* [Add object notes](#add-object-notes)
|
||||||
* [Show all the git-notes](#show-all-the-git-notes)
|
* [Show all the git-notes](#show-all-the-git-notes)
|
||||||
|
* [Apply commit from another repository](#apply-commit-from-another-repository)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
@ -954,5 +955,10 @@ git notes add -m 'Note on the previous commit....'
|
|||||||
git log --show-notes='*'
|
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
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end -->
|
<!-- @doxie.inject end -->
|
||||||
|
@ -411,4 +411,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"title": "Show all the git-notes",
|
"title": "Show all the git-notes",
|
||||||
"tip": "git log --show-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"
|
||||||
}]
|
}]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user