10

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)

jcubic
  • 61,973
  • 54
  • 229
  • 402

1 Answers1

16

Try escaping the # character:

$ cat .gitignore
\#*.txt\#

I hope this helps.

jsbueno
  • 99,910
  • 10
  • 151
  • 209
mamapitufo
  • 4,680
  • 2
  • 25
  • 19