From 7ecc00c50b7989de6f8fd6b23bbc3d15d38a8d9d Mon Sep 17 00:00:00 2001 From: Samar Panda Date: Sat, 25 Jul 2015 15:22:52 +0530 Subject: [PATCH] Tips using git cherry-pick --- README.md | 6 ++++++ tips.json | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 6fe057b..6c7d6fc 100644 --- a/README.md +++ b/README.md @@ -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) * [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) +* [Pick commits across branches using cherry-pick](https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick) @@ -130,5 +131,10 @@ curl http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completio git whatchanged --since='2 weeks ago' ``` +## Pick commits across branches using cherry-pick +```sh +git checkout && cherry-pick +``` + diff --git a/tips.json b/tips.json index a4c7c06..6dd2470 100644 --- a/tips.json +++ b/tips.json @@ -75,5 +75,9 @@ { "title": "What changed since two weeks?", "tip": "git whatchanged --since='2 weeks ago'" + }, + { + "title": "Pick commits across branches using cherry-pick", + "tip": "git checkout && cherry-pick " } ]