Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.gitignore regex for emacs temporary files

Tags:

People also ask

What is Gitignore SWP?

*.swp. *.swo. Which helps you to ignore all temporary vim files from a project. For ignoring globally, you can create a .gitignore file in your home and use the following command: git config --global core.excludesfile ~/.gitignore.


I'm trying to .gitignore emacs temporary/autosave files. I'm using...

\.\#.* 

in my .gitignore.

But git add -A run in a subfolder is still giving me:

#       new file:   .#make_collections.py #       new file:   .#norm_collections.py #       new file:   make_collections.py #       new file:   norm_collections.py 

even though

\.\#.* 

is clearly getting the right file names and not the wrong ones when I test it with a regex tester.