Skip to content
svicalifornia edited this page Dec 3, 2014 · 6 revisions

Add these options to your global Git config file at ~/.gitconfig. You can override any of these options per-project by creating/editing the local repo's .git/config file.

# Used as default for commit messages
[user]
  name = Your Full Name
  email = [email protected]

# To automate logins to GitHub repos
[github]
  user = your-github-username
  token = your-github-token-hash

# To push current branch to remote without repo or branch args
[push]
  default = current

[core]
  # Set any text editor you prefer (for commit messages,
  # interactive rebase, etc.)
  editor = nano

  # Make a list of filenames to exclude from all repos
  excludesfile = "/path/to/.gitexcludes"

# Helpful shortcuts to common commands
[alias]
  co = checkout
  st = status
  ci = commit -a
  cia = commit -a --amend
  unadd = reset HEAD
  br = branch
  pr = pull --rebase
  rb = rebase
  rbc = rebase --continue
  rba = rebase --abort
  cp = cherry-pick
  cpc = cherry-pick --continue
  cpa = cherry-pick --abort
  gr = log --graph --decorate --oneline --all

# Add green and red coloring to status messages
[color]
  status = auto
[color "status"]
  added = green
  changed = red
  untracked = red
Clone this wiki locally