Use specific .git folder if no .git folder is present in project root or, even better, when current folder matches certain paths (ex: ~/.config/**/*
, ~/.local/share/**/*
)
I'm using Git-based dotfiles managment:
- /
I have bare git repository in ~/Repositories/dotfiles
and alias dotfiles='git --git-dir=$HOME/Repositories/dotfiles --work-tree=$HOME'
and dotfiles config --local status.showUntrackedFiles no
When I'm editing my dotfiles with VSCode git
integration doesn't work because there is not .git
folder in ~/.config/zsh
, for example, it's located in ~/Repositories/dotfiles
which tracks ~/
.
The folder currently open
doesn’t have a Git
repository. You can
initialize a repository
which will enable source
control features powered by
Git.
Can I make VSCode git
integration use .git
from ~/Repositories/dotfiles
bare repository either when there no .git
present in project root ("fallback" method) or when project root matches certain paths (ex: ~/.config/**/*
)?