简体   繁体   English

如何合并来自不同分支的 git commit?

[英]How can i merge a git commit from a different branch?

与开发人员合作,我想将他分支中的选定提交合并到我的分支中并将其推送到生产中。

You can use git cherry pick您可以使用 git 樱桃选择

  • First go the the branch where you can to merge the commit (here your own branch)首先去你可以合并提交的分支(这里是你自己的分支)
  • Now copy the SHA id of the dev's commit现在复制开发者提交的 SHA id
  • git cherry-pick sha-id

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM