Skip to content

Commit a79913e

Browse files
hasban12138networm
authored andcommitted
fix 2.2章 星号(*)显示错误
1 parent a11fb45 commit a79913e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: book/02-git-basics/sections/recording-changes.asc

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ $ cat .gitignore
228228
* 要忽略指定模式以外的文件或目录,可以在模式前加上叹号(`!`)取反。
229229

230230
所谓的 glob 模式是指 shell 所使用的简化了的正则表达式。
231-
星号(`*`)匹配零个或多个任意字符;`[abc]` 匹配任何一个列在方括号中的字符
231+
星号(`\*`)匹配零个或多个任意字符;`[abc]` 匹配任何一个列在方括号中的字符
232232
(这个例子要么匹配一个 a,要么匹配一个 b,要么匹配一个 c);
233233
问号(`?`)只匹配一个任意字符;如果在方括号中使用短划线分隔两个字符,
234234
表示所有在这两个字符范围内的都可以匹配(比如 `[0-9]` 表示匹配所有 0 到 9 的数字)。
235-
使用两个星号(`**`)表示匹配任意中间目录,比如 `a/**/z` 可以匹配 `a/z` 、 `a/b/z` 或 `a/b/c/z` 等。
235+
使用两个星号(`\**`)表示匹配任意中间目录,比如 `a/**/z` 可以匹配 `a/z` 、 `a/b/z` 或 `a/b/c/z` 等。
236236

237237
我们再看一个 `.gitignore` 文件的例子:
238238

0 commit comments

Comments
 (0)