dotfiles link
I've cloned NvChad to $DOTFILES/config/nvim
. I want to keep track of the subfolder $DOTFILES/config/nvim/lua/custom
without keeping track of the rest of the nvim folder. How do I do that?
DOTFILES=~/Sync/config/dotfiles
I've done
cd $DOTFILES
git submodule add https://github.com/NvChad/NvChad config/nvim
to add this to /.gitmodules
[submodule "config/nvim"]
path = config/nvim
url = https://github.com/NvChad/NvChad
Then I've added this to the /.gitignore
config/nvim/*
!config/nvim/lua/
config/nvim/lua/*
!config/nvim/lua/custom/
But the custom folder is not being tracked.
I had solved it by moving the custom folder outside the submodule and linking it to it's proper place. But I'd prefer to know how to make git track it without doing that. Because this way messes the structure of my dotfiles with a folder out of place.
I install my dotfiles with symlinks. Every folder in the $DOTFILES/config/ folder
gets symlinked to $XDG_CONFIG_HOME
. Putting the custom folder in $DOTFILES/config/custom
would create a link for it and I don't want to create one. Putting it somewhere else doesn't make any sense because I want all configurations to be in the $DOTFILES/config/
folder.
I'll show the simplified tree to paint a clearer picture.
~/Sync/config/dotfiles
❯ tree
.
├── config
│ ├── alacritty
│ ├── git
│ ├── mutt
│ ├── nvim
│ │ ├── examples
│ │ ├── init.lua
│ │ ├── LICENSE
│ │ └── lua
│ │ ├── colors
│ │ ├── core
│ │ ├── custom
│ │ └── plugins
│ ├── tig
│ ├── tmux
│ ├── zathura
│ └── zsh
└── install
├── arch
├── Brewfile
├── debian
├── helpers.sh
├── install.sh
└── settings
└── cinnamon.sh
399 directories, 1836 files