git如何建立分支实现新功能合并新功能到主分支

建立测试分支 通常会临时修改一些代码 这些修改 不应该反映到主分支中 因此 用 commit 隔离住?git format-patch  生成某个文件的 patch  进行合并git reflog git cherry-pick 对某个特定修改 commit 合并, 例如 这个commit 里面只有一个文件 被修改了, 这些修改需要反馈到主分支中取 则 使用 建立临时性的 合并 分支 对某个commit 建立分支git branch xxxx commitgit diff commit commit  file > diff不同commit 之间文件的差异 其它分支 贡献 功能 到 主分支 上, 主分支 合并到 当前测试分支上

git branch op2  commit

根据特定commit 建立新的分支

原文地址:https://www.cnblogs.com/liyonghelpme/p/4273771.html