Dotfiles by Mathias (https://github.com/mathiasbynens/dotfiles) with symlink deployment by Holman (https://github.com/holman/dotfiles).
Using rsync to put the dotfiles where they need to go works fine, but over time your dotfiles in $HOME and in your repository become out of sync. I found I was spending too long trying to work out the differences between the two sets of files.
So I decided they should be symlinked! I borrowed some bash functions, and here we are.
You can clone the repository wherever you want. Some like to put it in
$HOME/.dotfiles/
but I prefer $HOME/development/dotfiles
. Note that the
bootstrap file does not do a git pull
so you'll need to make sure your
repository is up to date periodically.
git clone https://github.com/jarshwah/dotfiles && cd dotfiles
To update, cd
into your local dotfiles
repository and then:
source bootstrap.sh
This will symlink all the files from dotfiles/symlink/
to your $HOME
directory. If there are clashes with existing files, you will be prompted
to overwrite, skip, or backup. It will also attempt to install homebrew if it
is not yet installed.
I've intentionally kept the prompt very simple to maximise usable space in the terminal. Feel free to modify and use all the available colours.
Vim, tmux, screen and wget supplied config files with some basic defaults - ready for you to modify and personalise.
Just copy your config files into the dotfiles/symlink directory, and it will be deployed to your $HOME directory when you run the bootstrap script.
When setting up a new Mac, you may want to set some sensible OS X defaults:
./.osx
You should look over this script first, especially while paying attention to the computer names at the top of the file.
Maintain a list of your home brew packages in the BrewFile, and home brew casks in your CaskFile. Simply install by:
brew bundle BrewFile
brew bundle CaskFile
Manage your $PATH
variable in the .path
file. We already add the homebrew
bin and $HOME/bin so you don't have to.
Store all your environment variables in the .exports
file. We've got your
history and python startup covered.
The .bash_profile
will try to source ~/.extra
if it exists. This is the
place for you to put your private data and variables. You might want to setup
your git config in this file:
# Git credentials
# Not in the repository, to prevent people from accidentally committing
# under my name
GIT_AUTHOR_NAME="Josh Smeaton"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="jarshwah@example.com"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
Suggestions/improvements welcome!
Though you are probably better off forking https://github.com/mathiasbynens/dotfiles which is what this project is based on. You'll get much more support and progress there.
- Mathias for creating a really great base to work from
- Holman for having some sane deployment scripts
(original thanks by Mathias below)
- Gianni Chiappetta for sharing his amazing collection of dotfiles
- Matijs Brinkhuis and his dotfiles repository
- Jan Moesen and his ancient
.bash_profile
+ shiny tilde repository - Ben Alman and his dotfiles repository
- Nicolas Gallagher and his dotfiles repository
- Tom Ryder and his dotfiles repository
- Chris Gerke and his tutorial on creating an OS X SOE master image + Insta repository
- @ptb and his OS X Lion Setup repository
- Lauri ‘Lri’ Ranta for sharing loads of hidden preferences
- Tim Esselens
- anyone who contributed a patch or made a helpful suggestion