Skip to content

Commit abe7f67

Browse files
committed
Sync 02-git-basics undoing.
1 parent 1df81ab commit abe7f67

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

book/02-git-basics/sections/undoing.asc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $ git commit --amend
4242

4343
[source,console]
4444
----
45-
$ git add .
45+
$ git add *
4646
$ git status
4747
On branch master
4848
Changes to be committed:
@@ -79,7 +79,8 @@ Changes not staged for commit:
7979

8080
[NOTE]
8181
=====
82-
虽然在调用时加上 `--hard` 选项**可以**令 `git reset` 成为一个危险的命令(译注:可能导致工作目录中所有当前进度丢失!),但本例中工作目录内的文件并不会被修改。不加选项地调用 `git reset` 并不危险——它只会修改暂存区域。
82+
虽然在调用时加上 `--hard` 选项**可以**令 `git reset` 成为一个危险的命令(译注:可能导致工作目录中所有当前进度丢失!),但本例中工作目录内的文件并不会被修改。
83+
不加选项地调用 `git reset` 并不危险 — 它只会修改暂存区域。
8384
=====
8485

8586
到目前为止这个神奇的调用就是你需要对 `git reset` 命令了解的全部。我们将会在 <<_git_reset>> 中了解 `reset` 的更多细节以及如何掌握它做一些真正有趣的事。
@@ -119,7 +120,8 @@ Changes to be committed:
119120

120121
[IMPORTANT]
121122
=====
122-
你需要知道 `git checkout -- [file]` 是一个危险的命令,这很重要。你对那个文件做的任何修改都会消失 - 你只是拷贝了另一个文件来覆盖它。
123+
你需要知道 `git checkout -- [file]` 是一个危险的命令,这很重要。
124+
你对那个文件做的任何修改都会消失 - 你只是拷贝了另一个文件来覆盖它。
123125
除非你确实清楚不想要那个文件了,否则不要使用这个命令。
124126
=====
125127

0 commit comments

Comments
 (0)