I'm trying to manage my neovim's init.vim with git.
I want to ignore everything except the init.vim in the same folder as the .gitignoreand one kalisi.vim in the directory
/bundle/vim-airline/autoload/airline/themes/
This is my current .gitignore:
# Ignore everything
*
# Exceptions
!.gitinore
!init.vim
!bundle
bundle/*
!bundle/vim-airline
bundle/vim-airline/*
!bundle/vim-airline/autoload
bundle/vim-airline/autoload/*
!bundle/vim-airline/autoload/airline
bundle/vim-airline/autoload/airline/*
!bundle/vim-airline/autoload/airline/themes
bundle/vim-airline/autoload/airline/themes/*
!bundle/vim-airline/autoload/airline/themes/kalisi.vim
My thoughts about this:
Ignore everything:
*Except this
.gitignore:!.gitgnoreAnd the
init.vimin the same directory:!init.vimAlso don't ignore the folder
bundle:!bundleBut everything in it:
bundle/*Except the folder
vim-airline:!vim-airline
I think you get the idea...
But if I execute git status now only get bundle/ as untracked file. Should't I get kalisi.vim or bundle/vim-airline/autoload/airline/themes/kalisi.vim?
I'm hoping for a more elegant way to be honest. I also heard about placing multiple .gitignore's in the directories, but the subdirectories are all projects with it's own .gitignore and this would create a huge amount of work to only not-ignore the right .gitignore.
I hope someone has an idea what to do, currently it just seems like the bundle/ directory is tracked, but not the content I want...