Skip to content
Avindra Goolcharan edited this page Jun 6, 2026 · 5 revisions

Installation

Make ~ a git repo. Stolen from a great StackOverflow post:

Note: cd without any arguments automatically changes to your home folder.

cd
git init

git remote add origin git@github.com:avindra/dotfiles.git
git fetch

# or use the keyless (but slower) https://github.com/avindra/dotfiles.git

# The -f flag will overwrite ALL files
# this is good because it makes doing updates OR full resets very easy
git checkout -f -t origin/src

ℹ️ After the repo is cloned, most things should already be working. Be sure to see Package management next to find out what software is required.

⚠️ To setup the PATH for fish, call _setup_fish from a bash session.

Upgrades

Manual: Do upgrades manually with git pull. dotfile_update is a function that can be used instead, to stash local changes automatically.


Automatic: Put in crontab Do it for all devices.

Crontab integration: The following line runs an update at lunchtime every day:

As user:

30   12   * * * cd && git pull --rebase > /tmp/dotfileupdater 2>&1

or as root:

30   12   * * * /usr/bin/su - ${USER} -c 'git pull' > /tmp/dotfileupdater 2>&1

Resets

Deleting the .git folder

cd
rm -fr .git

Design

Put it in SCM.

The ~ folder is a git repository that you can push and pull directly from.

What's the limitation? That I cannot go beyond ~ (i.e., no mucking around in /etc). However, one typically doesn't want to muck about much in the /etc folder, as the defaults for a given operating system tend to be secure and well defined.

One advantage to storing your work in SCM is that setting up your environment or keeping it in sync is that this is a matter of managing the source repository.

Clone this wiki locally