0

Possible Duplicate:
How do I merge a specific commit from one branch into another in Git?

I'm newby to git. Got a question: If I want a single commit from one branch onto another branch, what command should I use? Thx in advance.

Community
  • 1
  • 1
heron
  • 3,337
  • 22
  • 73
  • 142

2 Answers2

3

Use cherry pick, as per:

http://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html

Stuart Golodetz
  • 19,132
  • 3
  • 45
  • 79
3

Something like: git cherry-pick 575f9b1a75673067830bb224ee09b201923093a6

or

git cherry-pick my-branch (to get the top commit on my-branch).

jmh
  • 7,676
  • 1
  • 16
  • 25