[root@VM_0_3_centos project]# vim index.html
index
[root@VM_0_3_centos project]# vim style.css
css
修改工作区文件的内容
[root@VM_0_3_centos project]# git diff #默认比较的是工作区和暂存区文件的区别
diff --git a/index.html b/index.html
index e69de29..9015a7a 100644
--- a/index.html
+++ b/index.html
@@ -0,0 +1 @@
+index
diff --git a/style.css b/style.css
index e69de29..dac138d 100644
--- a/style.css
+++ b/style.css
@@ -0,0 +1 @@
+css
git分为工作区、暂存区和版本库
[root@VM_0_3_centos project]# git diff index.html #指定比较哪个文件
diff --git a/index.html b/index.html
index e69de29..9015a7a 100644
--- a/index.html
+++ b/index.html
@@ -0,0 +1 @@
+index
网友评论