Add support for git checkout -b.

Also some linting cleanup.