Tuesday, July 8, 2014

git - cherry pick

http://nathanhoad.net/how-to-cherry-pick-changes-with-git
First, from within your feature branch, copy the first six or seven characters of the ID of the commit that you want to bring in:
Selecting a commit hash
Now jump into the branch that you want to insert the commit into (I'm using master):
git checkout master
And then cherry-pick your commit:
git cherry-pick c90fd66
Now if you do a git log you will see your cherry-picked commit at the top.

No comments:

Post a Comment

Followers

Blog Archive