zjffun blog

Git Apply Diff Patch

更新于 写于 GitPatch

sh
git diff > some-changes.patch

git apply /path/to/some-changes.patch

# when patch failed we can try to use -3 to apply the patch and resolve the conflict
git apply -3 /path/to/some-changes.patch