..." to">
赞
踩
修改已经提交的 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 命令查看具体修改内容:
$ git diff readme.txt
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 add 之后,执行 git status 查看状态:
$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: readme.txt
执行 git commit 之后,执行 git status 查看状态:
$ git status
On branch master
nothing to commit, working tree clean
注意:可以看出,当前没有需要提交的修改,工作目录是干净的(working tree clean)。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。