首页 > 其他 > 详细

Git学习——查看修改记录

时间:2018-06-10 19:54:00      阅读:224      评论:0      收藏:0      [点我收藏+]

查看修改结果

  修改之前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学习——查看修改记录

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!