diff
来源:互联网 发布:js 深度克隆 编辑:程序博客网 时间:2024/05/29 15:14
在看<<version control with git >> 时偶然发现里面提到的一个GNU tool--GNU diff,好吧,其实我比较山,不知道上面这个这么好用的工具。
跟git diff 的比较
Administrator@PC-NAME ~/Desktop/ssh/repos/test (master)
$ echo 'hello' > test
Administrator@PC-NAME ~/Desktop/ssh/repos/test (master)
$ git add .
warning: LF will be replaced by CRLF in test.
The file will have its original line endings in your working directory.
Administrator@PC-NAME ~/Desktop/ssh/repos/test (master)
$ echo 'hello world' > test
Administrator@PC-NAME ~/Desktop/ssh/repos/test (master)
$ git diff
diff --git a/test b/test
index ce01362..3b18e51 100644
--- a/test
+++ b/test
@@ -1 +1 @@
-hello
+hello world
warning: LF will be replaced by CRLF in test.
The file will have its original line endings in your working directory.
GNU diff 比较两个文件的不同(self-explanation)
[root@HOSTNAME ~]# echo 'hello' >test
[root@HOSTNAME ~]# echo 'hello world' > test2
[root@HOSTNAME ~]# diff -u test test2
--- test 2012-01-26 01:56:07.000000000 +0800
+++ test2 2012-01-26 01:56:28.000000000 +0800
@@ -1 +1 @@
-hello
+hello world
Reference :
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- Diff
- diff
- Algorithm::Diff, diff()
- 语义diff
- 语义diff
- 模板路径常量传址到js文件中的小技巧
- 2012_01_25
- POJ 1118,2606,2780,3512
- Basic Management Theory
- 使用ob_gzhandler函数有3种方法让它对php进行压缩
- diff
- json_decode使用
- USACO Section 5.1 Musical Themes - 题目转换以及KMP..
- 今天终于理解了JSON
- Memcached - PHP 安装&使用
- 【2-SAT】POJ 3648
- 该用Tryparse了
- parse和Tryparse区别
- .NET中IO体系结构