21 lines
578 B
Markdown
21 lines
578 B
Markdown
# git 忽略
|
|
|
|
> 显示/更新 `.gitignore` 文件。
|
|
> 这是 `git-extras` 的一部分。另见 `git ignore-io`。
|
|
> 更多信息:<https://github.com/tj/git-extras/blob/master/Commands.md#git-ignore>。
|
|
|
|
- 显示所有全局和本地 `.gitignore` 文件的内容:
|
|
|
|
`git ignore`
|
|
|
|
- 私下忽略文件,更新 `.git/info/exclude` 文件:
|
|
|
|
`git ignore {{file_pattern}} --private`
|
|
|
|
- 在本地忽略文件,更新本地 `.gitignore` 文件:
|
|
|
|
`git ignore {{file_pattern}}`
|
|
|
|
- 全局忽略文件,更新全局 `.gitignore` 文件:
|
|
|
|
`git ignore {{file_pattern}} --global` |