我在使用Emacs时,它会创建像#foo.txt#这样的临时文件,我应该如何在.gitignore中添加匹配该类文件的规则(#在.gitignore中被解释为注释)?
#foo.txt#
.gitignore
尝试转义 # 字符:
#
$ cat .gitignore \#*.txt\#