Git(5)——查看修改内容

来源:互联网 发布:成人高考网络教育 编辑:程序博客网 时间:2024/06/16 02:11
  • 将readme.txt文件改为以下内容
Git is a distributed version control system.Git is free software.
  • 运行git status命令查看结果
$ 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这个命令来看看更改的地方(difference)
$ git diff readme.txt diff --git a/readme.txt b/readme.txtindex 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.
0 0
原创粉丝点击