Tips using git cherry-pick

This commit is contained in:
Samar Panda 2015-07-25 15:22:52 +05:30
parent 885357aa83
commit 7ecc00c50b
2 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,7 @@
* [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) * [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)
* [Get git bash completion](https://github.com/git-tips/tips#get-git-bash-completion) * [Get git bash completion](https://github.com/git-tips/tips#get-git-bash-completion)
* [What changed since two weeks?](https://github.com/git-tips/tips#what-changed-since-two-weeks) * [What changed since two weeks?](https://github.com/git-tips/tips#what-changed-since-two-weeks)
* [Pick commits across branches using cherry-pick](https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. --> <!-- Dont 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 -->
@ -130,5 +131,10 @@ curl http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completio
git whatchanged --since='2 weeks ago' git whatchanged --since='2 weeks ago'
``` ```
## Pick commits across branches using cherry-pick
```sh
git checkout <branch-name> && cherry-pick <commit-ish>
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. --> <!-- Dont 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 -->

View File

@ -75,5 +75,9 @@
{ {
"title": "What changed since two weeks?", "title": "What changed since two weeks?",
"tip": "git whatchanged --since='2 weeks ago'" "tip": "git whatchanged --since='2 weeks ago'"
},
{
"title": "Pick commits across branches using cherry-pick",
"tip": "git checkout <branch-name> && cherry-pick <commit-ish>"
} }
] ]