when someone abandons you,it is him that gets loss because he lost someone who truly loves him but you just lost one who doesn’t love you.
当你创建了一个分支之后,你在分支上做了很多 debug 的操作,但是当你合并到 master 的时候,你又只需要几个非 debug 的 commit,这时候应该怎么办呢?不得不说,git 设计的很完善,你需要的它正好有
git cherry-pick:复制若干个 commit 到当前分支,这些 commit 代码提交可以是不同分支的 commit 提交
小场景:现在 master 分支打算把 develop 分支的 C、D、E 这三次提交复制到当前 mater 分支,应该怎么操作呢
首先从 develop 切换到 master 分支
1 | $ git checkout master |
然后执行 cherry-pick
1 | $ git cherry-pick <C commit-id> <D commit-id> <E commit-id> |
be yourself, everyone else is already taken.