q#unix Using a bare repository:
git init --bare $HOME/.dotfiles
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/fish/config.fish- we create an alias
configwhich we will use instead of the regulargitwhen we want to interact with our configuration repository. - we set a flag - local to the repository - to hide files we are not explicitly tracking yet. This is so that when you type
config statusand other commands later, files you are not interested in tracking will not show up asuntracked.
Again as a shortcut not to have to remember all these steps on any new machine you want to setup, you can create a simple script, store it as Bitbucket snippet ,create a short url for it and call it like this:1
curl -Lks http://bit.do/cfg-install | /bin/bash