0%

apply-git-patch-from-one-repository-to-another

生成补丁

两个分支之间的差异补丁:

git format-patch -M v1.9.6-4-rc3/v1.9.6-4-rc1

会生成从rc1rc3 的patch列表

apply patch

git am -3 -k file.patch

Ref

  1. Git subtree: the alternative to Git submodule
  2. git subtrees: a tutorial
  3. git: Apply changes introduced by commit in one repo to another repo
  4. GitTips
  5. Create patch or diff file from git repository and apply it to another different git repository
  6. How to apply a git patch from one repository to another?