Skip to content

Instantly share code, notes, and snippets.

@austenc
Forked from trey/happy_git_on_osx.md
Last active August 15, 2017 16:19
Show Gist options
  • Save austenc/58ede40e8af362a346c802986e04d5c5 to your computer and use it in GitHub Desktop.
Save austenc/58ede40e8af362a346c802986e04d5c5 to your computer and use it in GitHub Desktop.
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global alias.co checkout
git config --global apply.whitespace nowarn

Setup an SSH key

ssh-keygen

Hit return a couple of times -- leave password blank if you want.

cat ~/.ssh/id_rsa.pub | pbcopy

Paste that code into your settings page on your repository host(s).

Create a ~/.gitexcludes file and paste in this:

.DS_Store

There, now you don't have to ignore that every time.

Sources

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