将 1 个提交从 1 个分支合并到主分支?
I've read this book section about git branches.
I have create a branch called 'experimental'. I switch to that branch and make 2 commits there. So if it possible for me to merge the later commit (the 2nd of the 2 commits) of the experiment to the master branch?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在寻找的是 cherry-pick 命令。您还可以考虑其他一些替代方法。查看文章挑选个人提交 Git Ready。
What you are looking for is the cherry-pick command. There are a few other alternative methods that you might consider as well. Check out the article Pick Out Individual Commits on Git Ready.