Git学习——查看修改记录
Posted cjvae
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git学习——查看修改记录相关的知识,希望对你有一定的参考价值。
查看修改结果
修改之前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学习——查看修改记录的主要内容,如果未能解决你的问题,请参考以下文章
GitGit 分支管理 ( 克隆远程分支 | 克隆 master 分支 git clone | 查看远程分支 git branch -a | 克隆远程分支 git checkout -b )(代码片段