Skip to content

Instantly share code, notes, and snippets.

@jcdarwin
Last active December 11, 2015 07:01
Show Gist options
  • Save jcdarwin/c7fde42a8684524b460e to your computer and use it in GitHub Desktop.
Save jcdarwin/c7fde42a8684524b460e to your computer and use it in GitHub Desktop.
A README.md file describing how we set up our environment on a new Mac.

What is this?

This is a description of how we've setup our home directory on this machine.

Dotfiles

We use Mathias Bynen's dotfiles to give us a number of default settings.

Any extra settings should go in the ~/.extra file.

scm_breeze

We use scm_breeze to provide us with a number of shortcusts for git and other commands.

Clone the repo:

git clone git://github.com/ndbroadbent/scm_breeze.git ~/.scm_breeze

Make any changes -- in our case we want to add an alias for "git commit -m"

Amend the file ~/.scm_breeze/git.scmbrc.example:

git_commit_amend_alias="gcam"
git_commit_amend_no_msg_alias="gcamh"
git_commit_msg_alias="gcm"

Amend the file ~/.scm_breeze/lib/git/aliases.sh:

_alias "$git_commit_amend_alias"        'git commit --amend'
_alias "$git_commit_msg_alias"          'git commit --message'

Run the install script:

~/.scm_breeze/install.sh

If we ever want to add additional aliases, before doing the above, simply delete the .git.scmbrc file.

scm_breeze writes a command to .bashrc to initialise itself, but in order to get scm_breeze working with our dotfiles, we have to add the following to our .bash_profile:

[[ -s "$HOME/.scm_breeze/scm_breeze.sh" ]] && source "$HOME/.scm_breeze/scm_breeze.sh"

To see a list of git aliases:

git_aliases

To see a list of all aliases:

list_aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment