0

I'm trying to create a .gitignore that will ignore everything except from some folders and files. However, I can't get to "unignore" folder that begins with a dot.

This is my .gitignore:

*
!.gitignore

!.tmux.conf

!.config/lvim/
!.config/nvim/

Right now is properly ignoring every file except .gitignore and .tmux.conf but it wont "unignore" the folders withing .config/.

How can I make it to detect these files?

  • 1
    Note that the "duplicate" is not an *exact* duplicate, but the solution is the same. – torek Jan 16 '22 at 20:44
  • I already went to that post before but I could not get it to work with the answers posted there. I can unignore every folder or file I want except for folders starting with a dot. – Carlos Gonzalez Jan 16 '22 at 20:56
  • 2
    You need `!.config` (with or without a trailing slash) before `!.config/lvim/` etc will work. That's from the first answer. – torek Jan 16 '22 at 21:02

0 Answers0