Posts Tagged ‘cherry-pick’

how to merge individual commit in git

Thursday, July 9th, 2009

在用 git 开发的过程中,通常不同的 feature 会在不同的 branch 中开发,再 merge 到 master branch 中。但有时候会需要从某个 branch 中合并几个文件或某个 commit 进来,方法有两种:

1、合并几个文件(参考链接
git checkout source_branch <paths>…

2、合并某个 commit(参考链接
git cherry-pick <commit id>