Vim creates ignore files. For example, the file foo.bar, would have an associated: .foo.bar.un~.
I'm trying to get git to ignore all hidden files, with the exception of .gitignore:
.*
!.gitignore
However, this misses some undo files.
Running git check-ignore confirms that:
public/.index.html.un~ is caught by .*, but src/screens/.HomeScreen.js.un~ is not caught by anything...
The only difference that I can see is that it's two directories in, rather than one, but this shouldn't make a difference, from my understanding of the gitignore format.