add #*# glob to .gitignore?

╄→尐↘猪︶ㄣ 提交于 2019-11-28 17:41:53

Did you try

\#*#

Since 1.6.2, \ should be supported in .gitignore (see this patch)

To be precise, 1.6.2.1 (March 2009)

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

Another way of escaping # is to use the character set syntax, so that your #*# glob becomes

 [#]*[#] 

in your .gitignore file.

This doesn't exactly answer your question, but I think it may solve more problems than just this one symptom:

You can move the autosave and backup files into a completely different directory so that your source directories don't get cluttered.

This worked for me.

*[#]*[#]
*[#]*

@CharlesStewart was close but did not work for sub-directory files which had autosave generated files.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!