Git Cherry-pick概念理解
Cherry pick allows you to apply the changes introduced by some existing commits. for example, if you have two different branches, and your current branch lacks one or two commits that would be helpful but are only in the other branch, then you can cherry pick to grab those commits without merging or rebasing to get all commits.
Cherry pick用法学习:对于多分枝的代码库,将代码从一个分支转移到另一个分支是常见的需求。
这个时候分为两种情况:
1.你需要另一个分支的所有代码变动,那么就采用合并,用git merge。
2. 你只需要部分代码变动(某几个提交),这个时候就可以采用Cherry Pick。
放上一幅图方便理解: