This is a very basic repo for managing and tracking my dotfiles
using plain 'ol git.
Feel free to use this repo as a reference/example for creating your own dotfiles.
For ease of use, we'll create a dotfiles
alias for the git
command.
alias dotfiles='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
If you are settings up dotfiles
for the first time, meaning you have NOT set it up on any other computer, then you need to create the initial repo.
git init --bare "$HOME/.dotfiles"
dotfiles config --local status.showUntrackedFiles no
If you've already setup a repo with your configs and are setting up a new computer, you can do the same things except clone the repo instead.
git clone --bare <git-repo-url> "$HOME/.dotfiles"
dotfiles checkout
dotfiles config --local status.showUntrackedFiles no
Since this is just a fancy git
alias the usage is exactly the same except you must explicitly add new configs that need tracked.
dotfiles add .gitconfig
dotfiles commit -m "An example"
dotfiles push
See LICENSE.
- Dotfiles: Best Way to Store in a Bare Git Repository by Atlassian