My shell configuration files.
To keep track of these files. My dotfiles are based very heavily on Cowboy's dotfiles.
That command is dotfiles, and this is my "dotfiles" Git repo.
It's really not very complicated. When dotfiles is run, it does a few things:
- Git is installed if necessary, via APT or Homebrew (which is installed if necessary).
- This repo is cloned into the
~/.dotfilesdirectory (or updated if it already exists). - Files in
initare executed (in alphanumeric order, hence the "50_" names). - Files in
copyare copied into~/. - Files in
linkare linked into~/.
Note:
- The
backupsfolder only gets created when necessary. Any files in~/that would have been overwritten bycopyorlinkget backed up there. - Files in
binare executable shell scripts (Eg. ~/.dotfiles/bin is added into the path). - Files in
sourceget sourced whenever a new shell is opened (in alphanumeric order, hence the "50_" names). - Files in
confjust sit there. If a config file doesn't need to go in~/, put it in there. - Files in
cachesare cached files, only used by some scripts. This folder will only be created if necessary.
- You need to be an administrator (for
sudo). - You need XCode Command Line Tools or a full installation of XCode. Running
giton the command line triggers OS X to offer an automatic install of XCode Command Line Tools.
- You need to be an administrator (for
sudo).
bash -c "$(curl -fsSL https://raw.githubusercontent.com/evanchiu/dotfiles/master/bin/dotfiles)" && source ~/.zshrcAny file in the copy subdirectory will be copied into ~/. Any file that needs to be modified with personal information (like .gitconfig which contains an email address and private key) should be copied into ~/. Because the file you'll be editing is no longer in ~/.dotfiles, it's less likely to be accidentally committed into your public dotfiles repo.
Any file in the link subdirectory gets symbolically linked with ln -s into ~/. Edit these, and you change the file in the repo. Don't link files containing sensitive data, or you might accidentally commit that data!
In addition to the aforementioned dotfiles script, there are a few other scripts. This includes ack, which is a git submodule.
- dotfiles - (re)initialize dotfiles. It might ask for your password (for
sudo). - source - (re)source all files in
sourcedirectory - Look through the bin subdirectory for a few more.
https://github.com/cowboy/dotfiles
Copyright (c) 2018 Evan Chiu
Licensed under the MIT license