Dot Files
For now, just collecting some links on this:
- I’m implementing this at the moment: https://www.atlassian.com/git/tutorials/dotfiles
- Other links:
- https://medium.freecodecamp.org/dive-into-dotfiles-part-2-6321b4a73608
- https://dotfiles.github.io/
- http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html
Basic setup
I’m drawing from first link above, but putting commands etc., here to make sure I have a record of them.
# Initial setup
CFG=$HOME/.mickcfg
git init --bare $CFG
alias config='/usr/bin/git --git-dir=$CFG --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$CFG --work-tree=$HOME'" >> $HOME/.bashrc
# ################################################
# then in use:
config add .mydotfile
config commit
config push
# ################################################
# After setting up on laptop, I wanted to push the repo to a more
# "always on" location, so following
Remote> CfgDir=$HOME/.mickcfg/
Remote> mkdir -p $CfgDir
Remote> alias config='/usr/bin/git --git-dir=$CfgDir --work-tree=$HOME'
Remote> git init --bare $CfgDir
# Then back on laptop
config push --set-upstream USERNAME@MYSERVER:.mickcfg master
config commit -a
config push
# ################################################
# On a new system
echo "alias config='/usr/bin/git --git-dir=$CFG --work-tree=$HOME'" >> $HOME/.bashrc
echo ".mickcfg" >> .gitignore
git clone --bare GitRepoURL $HOME/.mickcfg
cd $HOME && config checkout
# and resolve the various conflicts since you'll probably have
# collisions
config config --local status.showUntrackedFiles no