0

I want to merge some commits from master to a tag.

We create tags to mark major releases. However, if we need to do some quick fixes. We do it in master. But then we need to merge those commits to the tag.

In addition, not all commits needs to be merged at times. That's why we need to choose specific commits only..

How can we do that?

comebal
  • 946
  • 3
  • 14
  • 30

1 Answers1

2

Use git-cherry-pick command (doc)

git checkout <TAG_NAME>
git cherry-pick <COMMIT_HASH>

Or you can even apply the most recent commit from the master git cherry-pick master

user20140268
  • 1,313
  • 11
  • 16
  • i see. thanks! another thing. i mentioned i created tags. now, i realized it's just on my local. how do i actually create tags on remote from a specific commit? – comebal Nov 28 '13 at 12:32
  • Here you can find the answer how to push tag to remote http://stackoverflow.com/questions/5195859/how-can-i-push-a-tag-to-a-remote-repository-using-git – user20140268 Nov 28 '13 at 12:35