没有添加新文件:
1. git diff > ~/1.patch
2. git apply ~/1.patch
添加新文件:
1. git add .
2. git commit
3. git log
4. git diff commitid_old commitid_new > ~/1.patch
5. git apply
添加图片:
上述第4步: git diff -p --binary commitid_old commitid_new >patch
没有添加新文件:
1. git diff > ~/1.patch
2. git apply ~/1.patch
添加新文件:
1. git add .
2. git commit
3. git log
4. git diff commitid_old commitid_new > ~/1.patch
5. git apply
添加图片:
上述第4步: git diff -p --binary commitid_old commitid_new >patch