DEV Community

Discussion on: The Bare Repo Approach to Storing Home Directory Config Files (Dotfiles) in Git using Bash, Zsh, or Powershell

Collapse
 
bbenzikry profile image
Beni Ben zikry • Edited

Hi Jonathan, great post.
A simpler approach I use is

alias dotfiles="GIT_WORK_TREE=~ GIT_DIR=~/dotfiles"
$ dotfiles git status
$ dotfiles code-insiders ~
Enter fullscreen mode Exit fullscreen mode

This allows things to be a bit more readable and has the benefit of allowing other programs to get the same context if needed ( vscode etc. )