2026-06-20 12:51:39 -05:00
2026-06-20 12:51:39 -05:00

dot

Description

Dotfiles and new install guide.

Table of Contents

Starting Fresh

# Creates a folder ~/.dot which is a bare repository that will track our files.
git init --bare $HOME/.dot

# create an alias config which we will use to interact with our dotfile repo.
alias config='/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME'

# Set a LOCAL REPO flag to hide files we are not explicitly tracking yet,(all).
dot config --local status.showUntrackedFiles no

# Make sure our alias is set.
echo "alias dot='/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME'" >> $HOME/.bashrc

Migrating

git clone --bare https://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 {} .dot-backup/{}
fi;
dot checkout
dot config status.showUntrackedFiles no

Acknowledgments

Readme Driven Development - Tom Preston-Werner
Choose a License
Useful .gitignore Templates

License

This project is licensed under the MIT License - see the MIT License file for details.

S
Description
Dotfiles.
Readme 38 KiB