最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

visual studio code - VSCode set .git for dotfiles (bare repo that tracks `~`) - Stack Overflow

programmeradmin3浏览0评论

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:

  1. /

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/**/*)?

发布评论

评论列表(0)

  1. 暂无评论