码迷,mamicode.com
首页 > 其他好文 > 详细

Git学习——查看修改记录

时间:2018-06-10 20:13:04      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:modified   stat   TE   out   work   div   技术分享   文件   dde   

查看修改结果

  修改之前commit的文件,输入下面的而命令,可以查看文件的改动,输入下面命令。还可以采用git diff命令来看看具体修改了什么。

  如果确认无误,添加add和提交commit文件。

git status

On branch master
Changes not staged for commit:
    (use "git add <file>..." to update what will be committed)
    (use "git checkout -- <file>..." to discard changes in working directory)

            modified: readme.txt

no changes added to commit (use "git add" and/or "git commit -a")                

  技术分享图片

  

git diff
warning: LF will be replaced by CRLF in readme.txt.
The file will have its original line endings in your working directory.
diff --git a/readme.txt b/readme.txt
index 46d49bf..9247db6 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,2 +1,2 @@
-Git is a version control system.
+Git is a distributed version control system.
 Git is free software.

  技术分享图片

  技术分享图片

Git学习——查看修改记录

标签:modified   stat   TE   out   work   div   技术分享   文件   dde   

原文地址:https://www.cnblogs.com/cjvae/p/9164051.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!