Skip to content

Commit 964216b

Browse files
committed
Merge pull request #14 from samarpanda/cherry-pick
Using git cherry-pick
2 parents 885357a + 7ecc00c commit 964216b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* [Stage parts of a changed file, instead of the entire file](https://github.com/git-tips/tips#stage-parts-of-a-changed-file-instead-of-the-entire-file)
2323
* [Get git bash completion](https://github.com/git-tips/tips#get-git-bash-completion)
2424
* [What changed since two weeks?](https://github.com/git-tips/tips#what-changed-since-two-weeks)
25+
* [Pick commits across branches using cherry-pick](https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick)
2526

2627
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
2728
<!-- @doxie.inject end toc -->
@@ -130,5 +131,10 @@ curl http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completio
130131
git whatchanged --since='2 weeks ago'
131132
```
132133

134+
## Pick commits across branches using cherry-pick
135+
```sh
136+
git checkout <branch-name> && cherry-pick <commit-ish>
137+
```
138+
133139
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
134140
<!-- @doxie.inject end -->

tips.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,9 @@
7575
{
7676
"title": "What changed since two weeks?",
7777
"tip": "git whatchanged --since='2 weeks ago'"
78+
},
79+
{
80+
"title": "Pick commits across branches using cherry-pick",
81+
"tip": "git checkout <branch-name> && cherry-pick <commit-ish>"
7882
}
7983
]

0 commit comments

Comments
 (0)