Permalink
Commits on Oct 2, 2015
Commits on Apr 27, 2015
  1. Move Git aliases to subcommand scripts

    Any executable script on you PATH
    that is named `git-some-name`
    will be available as a git subcommand,
    which means you could do `git some-name` to run the script.
    
    Git adds them to `git help -a` under the title
    "git commands available from elsewhere on your $PATH",
    which will then power the auto completion,
    so that will also work for any command you add.
    
    http://blog.zamith.pt/blog/2014/11/05/supercharging-your-git/
    
    Examples of other projects that structure their dotfiles like this:
    
    https://github.com/robbyrussell/oh-my-zsh
    https://github.com/tj/git-extras
    https://github.com/holman/dotfiles
    croaky committed Apr 12, 2015
Commits on Feb 18, 2015
  1. Switch from gh to hub

    * `hub` is the official GitHub client.
    * Like `gh`, `hub` 2.2.0 now powered by the Go programming language.
      https://github.com/github/hub/releases/tag/v2.2.0
    * It has been bottled in Homebrew.
      Homebrew/legacy-homebrew@1ad37e4
    * We are using it in the Laptop script.
      thoughtbot/laptop@9fe038c
    croaky committed Feb 15, 2015
Commits on Jan 26, 2015
  1. Add `git rename-branch` alias

    * Extract `git current-branch` alias.
    * Re-use `git current-branch` in two places.
    croaky committed Jan 26, 2015
Commits on Dec 3, 2014
  1. Add more Git hooks, delegate to .local convention

    The `pre-commit` and `prepare-commit-msg` git hooks can be used
    for some interesting things such as linting files.
    
    For example, I need to format, vet, and lint Go files:
    
    https://github.com/croaky/dotfiles/blob/master/git_template.local/hooks/pre-commit
    https://github.com/croaky/dotfiles/blob/master/git_template.local/hooks/prepare-commit-msg
    
    We've rejected Go-related pull requests to thoughtbot/dotfiles
    due to not doing enough "official" Go work at the company.
    This change helps me start with `.local` for now,
    and then promote to "upstream" (thoughtbot/dotfiles) at some point
    in the future if we do more "official" Go work.
    
    I'm a believer in having linting done at VCS "commit time", either
    locally in a pre-commit so I have a chance to fix things and not both my
    teammates with linting issues, or at post-commit time via Hound comments
    (also automated, but opportunity to ignore).
    
    I've tried adding linting libraries to my editor, and found them too
    slow, at least for Ruby. I've limited "editor-time" checking to just
    syntax checking via Syntastic.
    
    The downsides I see to adding linting to the test suite are:
    
    * Style violations are not functional failures and logically shouldn't
      fail a build.
    * Adding code coverage, linting, etc. to a test suite slows down the
      build.
    * I only need to lint my diff (the commit), not the whole codebase, when I
      make changes.
    * Style violations should not prevent a user-facing, production deploy.
    * Adding linting to the test suite can slow that process down
      unnecessarily, particularly in continuous integration setups.
    
    I see the appeal of linting in the test suite, particularly for
    greenfield apps where we have total control, but I don't think it's a
    practice that we can universally apply to our client projects who have
    different deploy setups and existing codebases. So, I prefer the git
    hooks + Hound approach as a pragmatic middle ground.
    croaky committed Sep 4, 2014
  2. Remove mention of Brewfile

    It is no longer in our dotfiles.
    croaky committed Dec 3, 2014
Commits on Sep 30, 2014
  1. Use `gh`, not `hub`

    [gh] is a [hub] reimplementation that's much faster and is now the official
    Github CLI. It appears that "hub" is [deprecated].
    
    [gh]: https://github.com/jingweno/gh
    [hub]: https://github.com/github/hub
    [deprecated]: github/hub#475
    
    Matches thoughtbot/laptop:
    
    thoughtbot/laptop@d9a9dfe
    croaky committed Sep 30, 2014
  2. Document vim-mkdir in README

    croaky committed Sep 30, 2014
Commits on Jul 26, 2014
  1. Make it easy to checkout GitHub pull requests

    This alias makes the following workflow possible:
    
    Look at changes:
    
        git co-pr 123
        git diff origin/master
    
    Bundle, validate tests are passing:
    
        bundle
        rake
    
    Rebase interactively, squash, and potentially improve commit messages:
    
        git rebase -i master
    
    Merge code into master:
    
        git checkout master
        git merge pr/123 --ff-only
    
    Push:
    
        git push origin master
    
    Clean up:
    
        git branch -D pr/123
    croaky committed Jul 16, 2014
Commits on Jul 24, 2014
  1. Set Vim's spellfile to $HOME

    Running `zg` adds words to the `spellfile`:
    
    4f5a2ed
    http://robots.thoughtbot.com/vim-spell-checking
    
    Setting the spellfile keeps it out of its default location, `vim/spell`, which
    would otherwise be inside thoughtbot/dotfiles. We don't necessarily want to
    share the `spellfile` across the team.
    croaky committed Jul 16, 2014
Commits on Apr 30, 2014
  1. Show only basename and git branch in prompt

    * Switch order from "[git branch][pathname]" to "basename git branch %".
    * Remove noisy brackets.
    
    Example old:
    
        [master][~/dev/thoughtbot/dotfiles]
    
    Example new:
    
        dotfiles dc-prompt %
    croaky committed Mar 27, 2014
  2. Fix out of date README on rake, rspec commands

    `rake` and `rspec` commands that wrapped `zeus` were removed in 00dbd15.
    croaky committed Apr 30, 2014
Commits on Apr 25, 2014
  1. Run commands interactively from vim

    This allows us to do things like:
    
        <Leader>r migrate
    croaky committed Feb 11, 2014
Commits on Mar 14, 2014
  1. Exclude Brewfile

    It is project-specific, not intended for machine configuration.
    croaky committed Mar 14, 2014
Commits on Feb 8, 2014
  1. Don't assume location of zsh

    croaky committed Feb 8, 2014
Commits on Jan 23, 2014
  1. Add rbenv shims and trusted binstubs to PATH

    Our expected way of managing Rubies is with rbenv:
    
    https://github.com/thoughtbot/laptop/blob/master/common-components/ruby-environment
    
    This commit loads rbenv in `zshrc` as recommended by the rbenv docs:
    
    https://github.com/sstephenson/rbenv#basic-github-checkout
    
    Assuming the binstubs for a project are in the local bin/ directory, we
    can even go a step further to add the directory to shell $PATH so that
    rspec can be invoked without the bin/ prefix:
    
        export PATH="./bin:$PATH"
    
    Doing so on a system that other people have write access to (such as a
    shared host) is a security risk:
    
    rbenv/rbenv#309
    
    The `.git/safe` convention addresses the security problem:
    
    https://twitter.com/tpope/status/165631968996900865
    
    This zsh fix may be necessary for OS users in order to fix a bug:
    
    https://github.com/thoughtbot/laptop/blob/master/mac-components/zsh-fix
    croaky committed Sep 11, 2013
Commits on Jan 11, 2014
  1. Use thoughtbot/rcm in Brewfile

    croaky committed Jan 11, 2014
Commits on Nov 28, 2013
Commits on Nov 23, 2013
  1. Spell-check Markdown by type, not file extension

    Previously, only `*.md` files would get spell-checking. This change adds
    `*.markdown` and decouples Markdown spell-checking by file extension.
    
    http://robots.thoughtbot.com/vim-spell-checking/
    croaky committed Nov 23, 2013
Commits on Sep 11, 2013
  1. Allow backspacing over everything in insert mode

    The previous setting frequently slowed my ability to edit.
    croaky committed Aug 1, 2013
Commits on Jul 29, 2013
  1. Remove redundant syntax highlighting

    Newer versions of vim (such as 7.3.923) syntax highlight Rackup and JSON
    files correctly. In the interest of keeping the dotfiles slim and our
    machines up-to-date, I think the solution is to remove these from
    dotfiles and install a newer version of vim in thoughtbot/laptop:
    
    thoughtbot/laptop#118
    croaky committed Jul 29, 2013
Commits on Jul 27, 2013
  1. Add syntax highlighting to certain file types

    * Syntax highlight `Appraisals` as Ruby. Used especially for our open
      source libraries.
    * Syntax highlight rackup (`config.ru`) files as Ruby. Used in all our
      Ruby web apps. Rails apps are rarely touched but some of the Sinatra
      and Middleman apps are occasionally edited.
    * Syntax highlight JSON files as JavaScript. Used in our Trail Map.
    croaky committed Jul 27, 2013
Commits on Jul 11, 2013
  1. Git push to current, not upstream

    The primary use case for me is to `git push staging` and `git push
    production` from the master branch using our typical git workflow:
    
    https://github.com/thoughtbot/guides/tree/master/protocol#deploy
    croaky committed Jul 11, 2013
Commits on Jul 9, 2013
  1. Remove "DO NOT EDIT BELOW THIS LINE" convention

    It has been superceded by a `.local` suffix convention.
    croaky committed Jul 9, 2013
  2. Source ~/.zshrc.local if it exists

    Follows the pattern of:
    
    * ~/.aliases.local in ce7ad49
    * ~/.gitconfig.local in 8e141fe
    * ~/.vimrc.local in a666267
    
    Use consistent:
    
    * `source`ing style.
    * commenting style.
    
    I am using ~/.zshrc.local as a home for `eval "$(rbenv init -)"`.
    croaky committed Jul 7, 2013
Commits on Jun 24, 2013
  1. Turn off banner at login

    When logging into a new shell, users see a banner such as:
    
        Last login: Sun Jun 23 11:41:42 on ttys007
    
    Adding an empty ~/.hushlogin file turns that banner off:
    
    http://kb.iu.edu/data/acdd.html
    croaky committed Jun 23, 2013
Commits on Jun 18, 2013
  1. Isolate credits to README

    Per @mikeburns' suggestion.
    croaky committed Jun 18, 2013
Commits on Jun 11, 2013
Commits on May 17, 2013
  1. Remove reattach-to-user-namespace

    This is Mac OS X-specific. Including this line in the dotfiles causes
    `tmux` and `tmux new -s new-session` to break with `[exited]`.
    
    I personally don't do copy-pasteable work inside tmux anymore.
    
    I'm sure this is valuable to some of the thoughtbot vim users but I'm
    thinking it better belongs above `DO NOT EDIT BELOW THIS LINE` as custom
    configuration for those users.
    croaky committed May 12, 2013
Commits on May 13, 2013
Commits on Apr 23, 2013
  1. Fix reference to non-existent file

    Link to it for easy access in GitHub.
    croaky committed Apr 23, 2013
Commits on Apr 19, 2013
  1. Bundle vim-ruby/vim-ruby

    vim-ruby is where Vim's support for Ruby comes from - file type
    detection, syntax highlighting, etc. Vim bundles vim-ruby, but the
    GitHub project is always ahead of what's released with Vim.
    croaky committed Apr 14, 2013
Commits on Apr 14, 2013
  1. Remove `git br` alias

    I almost never use `git branch`.
    croaky committed Apr 14, 2013