Skip to content

Instantly share code, notes, and snippets.

@geo-stanciu
Created March 19, 2019 22:21
Show Gist options
  • Save geo-stanciu/7669bdbf04f8eea9f13d05273b7aa951 to your computer and use it in GitHub Desktop.
Save geo-stanciu/7669bdbf04f8eea9f13d05273b7aa951 to your computer and use it in GitHub Desktop.
Using git bare repository for dotfiles
mkdir -p $HOME/.dotfiles
git init --bare $HOME/.dotfiles
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
(add this alias to .bashrc)
bash config config --local status.showUntrackedFiles no
Basic usage example:
config add /path/to/file
config commit -m "A short message"
config push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment