点击进入:廖雪峰老师的Git教程
继续修改我们的README.MD文件。
$ cat README.MD
This is my first use.
This is my second use.
Git tracks changes.
Git tracks changes of files.
my stupid boss still prefers SVN.
$ 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.MD
no changes added to commit (use "git add" and/or "git commit -a")
如果想要撤销我们的修改,使用git checkout –file就可以了
$ git checkout -- README.MD
$ git status
On branch master
nothing