My personal dotfiles following the Atlassian bare repo tutorial
- Prevent weird recursion problems:
echo ".dotcfg" >> $HOME/.gitignore
- Clone this dotfile repository into the
.dotcfg
folder of your$HOME
:git clone --bare [email protected]:snototter/dotfiles.git $HOME/.dotcfg
- Define the following alias:
alias dotconfig='/usr/bin/git --git-dir=$HOME/.dotcfg/ --work-tree=$HOME'
- TODO
dotconfig checkout
- might fail (need to automate user query + backup) - Set repository properties:
# Hide untracked files dotconfig config --local status.showUntrackedFiles no # User details dotconfig config --local user.name "snototter" dotconfig config --local user.email "[email protected]" # Set upstream branch dotconfig push --set-upstream origin main
- Done, now dotfile changes can be simply tracked:
dotconfig status dotconfig add .bashrc dotconfig commit -m "Add bashrc" dotconfig push