Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add pattern that start with hash to gitignore [duplicate]

When I work with Emacs it create temporary files like #foo.txt# how can I add pattern to .gitignore that will ignore those files (# is interpreted by git as comment in .gitignore)

like image 676
jcubic Avatar asked Aug 10 '12 13:08

jcubic


1 Answers

Try escaping the # character:

$ cat .gitignore
\#*.txt\#

I hope this helps.

like image 125
mamapitufo Avatar answered Oct 28 '22 13:10

mamapitufo