How to manage dotfiles in a bare git-repo
How to set up:
Initialize an empty git repo in a folder in $HOME
:
|
|
Now we want to set up an alias for git to work on this repo:
|
|
We want to hide untraced files, so we explicitly choose which files to track:
|
|
Make config persistent, I use zsh, so I add the alias to .zshrc
|
|
now its time to add a few existing config files to the repo:
|
|
I created a github repo and pushed my config to github:
|
|
Now, time to check out my config on another machine. First, checkout the repo using the --bare
option
|
|
Define the config-alias
|
|
And last: Check out the repo
|
|