git diff 打补丁

[root@workstation2017 demo]# git diff old new >cc.diff
[root@workstation2017 demo]# cat cc.diff
diff --git a/old/a/p/foo.txt b/new/a/p/foo.txt
index f041bcd..7351245 100644
--- a/old/a/p/foo.txt
+++ b/new/a/p/foo.txt
@@ -1,2 +1,2 @@
-old_line_1
-old_line_2
+new_line_1
+new_line_2

posted @ 2017-08-01 10:21  zengkefu  阅读(921)  评论(0编辑  收藏  举报