git - 将 #*# glob 添加到 .gitignore?

标签 git gitignore

我想使用 glob #*# 将 emacs 自动保存文件添加到我的 .gitignore,但当然,以哈希开头的行是注释行。

如何在不将其视为评论的情况下将其放入我的 .gitignore 中?

最佳答案

你试过吗

\#*#

从 1.6.2 开始,.gitignore 应该支持 \(参见 this patch)

准确地说,1.6.2.1 (2009 年 3 月)

.gitignore learned to handle backslash as a quoting mechanism for comment introduction character "#".

关于git - 将 #*# glob 添加到 .gitignore?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2209810/

相关文章:

git - 无法更改 git config 用户名,立即重置

java - Jenkins - 在每次构建之前检查 Git

git - Beyond Compare 4 在 OSX 上运行时失败,因为 git difftool

git - 如何排除在执行 'git status' 命令时显示的不需要的文件夹内容

git - merge 未在任一分支中修改的文件中的冲突

linux - Yocto 本地存储库

git - "git check-ignore *"和 "git ls-files --other --ignored --exclude-standard"有什么区别?

android - 在 Android 项目中 git 应该忽略哪些文件夹

wordpress - 使用 gitignore 排除 WordPress 上传文件夹中自动生成的图像大小

git - .gitignore,排除文件夹中的所有文件......但保留那些带有 .gitkeep 的子文件夹?