aboutsummaryrefslogblamecommitdiff
path: root/posts/dotfiles.md
blob: 6bd59c7b07a79bfa78489ec35a24b7bf7ab6d537 (plain) (tree)























                                                                      
# How I store my dotfiles.

I use a bare repository to sync my dotfiles and set it up as follows:

```
git init --bare $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
config add .config/nvim/init.lua
config commit -m "Added init.lua"
git remote add origin REMOTE_URL
git push origin master
```

To install them from mine or someone else's git repo do the following:

```
echo ".cfg" >> .gitignore
git clone --bare REMOTE-GIT-REPO-URL $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
config checkout
```