The purpose of this directory is to monitor dotfiles via a bare git repository. It is inspired by this https://www.atlassian.com/git/tutorials/dotfiles blogpost, which in turn was inspired by this https://news.ycombinator.com/item?id=11070797 HN thread. The repo has two branches, the main branch I use on Ubuntu distros with an GNOME DE. The arch branch is surprisingly for my minimal arch setup, currently running X11 + openbox + polybar.
- git init --bare $HOME/.cfg
- alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' or echo "alias config='usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc
- config config --local status.showUntrackedFiles no
While in $HOME
- Add the following to .bashrc alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
- source .bashrc
- echo ".cfg">> .gitignore. This is to preent potential recursive problems
- git clone --bare https://github.com/leoalho/dotfiles.git $HOME/.cfg
- Checkout the content to $HOME: config checkout
- config config --local status.showUntrackedFiles no
To use the git aliases in your .gitconfig. Add the following lines to your .gitconfig: [include] path = ~/.git_aliases, or any other path depending on your $HOME
To use the bash aliases in your .bashrc include the following to your .bashrc if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi