# dot ## Description There is no place like $HOME. Dotfiles bootstrapping guide. ## Table of Contents * [Start](#start) * [Setup](#setup) * [Acknowledgments](#acknowledgments) * [License](#license) ## Start Here is how you start using this setup. Create a folder ~/.dot which is a bare repository that will track our dotfiles. Create an alias for git called 'dot' to interact with our dotfile repo. Set a flag to hide files we are not explicitly tracking yet. Which is everything. Add the alias definition to your .bashrc. ```bash git init --bare $HOME/.dot alias dot='/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME' dot config --local status.showUntrackedFiles no echo "alias dot='/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME'" >> $HOME/.bashrc ``` Now add all of your dotfiles. Here is a example. `dot add .vimrc` ## Setup Here is how you can migrate this setup to another system. ```bash git clone --bare https://myrepos.dev/Randy-Jordan/dot.git $HOME/.dot function dot { /usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME $@ } mkdir -p .dot-backup dot checkout if [ $? = 0 ]; then echo "Checked out dotfiles."; else echo "Backing up pre-existing dot files."; dot checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{} fi; dot checkout dot config status.showUntrackedFiles no ``` ## Acknowledgments [Tom Preston-Werner README Driven Development](https://tom.preston-werner.com/2010/08/23/readme-driven-development)
[Make a README](https://www.makeareadme.com/)
[Choose a LICENSE](https://choosealicense.com/)
[Atlassian - How to store Dotfiles](https://www.atlassian.com/git/tutorials/dotfiles)
## License