Skip to content

Commit 1f19c4f

Browse files
committed
git diff and apply patch
1 parent 46800ba commit 1f19c4f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

memo/memo.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,10 @@ Git
916916
git tag -l # 显示所有 tag
917917
git checkout tags/<tag> -b <branch>
918918
919+
# 生成和应用 patch, https://stackoverflow.com/questions/28192623/create-patch-or-diff-file-from-git-repository-and-apply-it-to-another-different
920+
git diff tag1..tag2 > mypatch.patch
921+
git apply mypatch.patch
922+
919923
920924
Git工作流
921925
------------

0 commit comments

Comments
 (0)