Dotfiles

Comments

Mathias Bynes, of jsPerf fame, keeps his on Github - that would be .bash_profile and other default files. I think it’s a great idea, so I have started doing the same.

Using Git and the bootstrap script

I have a cloned version of the dotfile directory on my machine. To update

1
2
3
4
cd path/to/dotfile/clone
git pull origin master
./bootstrap.sh #./bootstrap.sh -f to avoid the prompt
. ~/.bash_profile

Path

I have no problem with putting the path under github - there’s no confidential stuff in there.

Add custom commands without creating a new fork

If ~/.extra exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository.

My ~/.extra looks something like this:

1
2
3
4
5
6
7
8
# Git credentials
# Not in the repository, to prevent people from accidentally committing under my name
GIT_AUTHOR_NAME="Fritz Stelluto"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="xxxxxxx"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"

You could also use ~/.extra to override settings, functions and aliases from my dotfiles repository. It’s probably better to fork this repository instead, though.

Sensible OS X defaults

When setting up a new Mac, you may want to set some sensible OS X defaults:

1
./.osx

Install Homebrew formulae

When setting up a new Mac, you may want to install some common Homebrew formulae (after installing Homebrew, of course):

1
brew bundle ~/Brewfile

Install native apps with brew cask

You could also install native apps with brew cask:

1
./.cask

Comments