DotFiles

2019/04/26

Categories: technology Tags: unix linux

Dot Files

For now, just collecting some links on this:

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