git - .gitignore 中的评论?

标签 git comments gitignore

你能在.gitignore 文件中写注释吗?

如果是这样,该行是否应该以 # 或其他指示符开头?

最佳答案

是的,你可以在那里发表评论。但是,它们必须从一行的开头开始。

比照。 http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files

The rules for the patterns you can put in the .gitignore file are as follows:
- Blank lines or lines starting with # are ignored.
[…]

注释字符为#,示例:

# no .a files
*.a

关于git - .gitignore 中的评论?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8865848/

相关文章:

regex - 使用正则表达式从 Forth 源代码中剥离注释

git - 重写整个 git 历史

git - 为来自 Ubuntu 的现有文件创建一个新的 BitBucket 存储库

postgresql - 如何在 PgAdmin 查询编辑器上打开评论 block ?

网站审核申请/界面

swift - Xcode 11 及其新框架(如 SwiftUI)是否需要更改为 .gitignore?

git - 如何在 Git 中查看单个提交的更改文件列表?

git - 无法 Cherry Pick (FETCH),但能够在 Gerrit Git 中 pull 和推送

git - 如何让 git 忽略 vendor/下的 .git 文件夹?

git - create-react-app git 推送 node_modules