Skip to content

Instantly share code, notes, and snippets.

@oli
Created January 19, 2012 04:27
Show Gist options
  • Save oli/1637874 to your computer and use it in GitHub Desktop.
Save oli/1637874 to your computer and use it in GitHub Desktop.

Revisions

  1. oli revised this gist Jan 26, 2012. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -15,12 +15,14 @@
    usedeltabaseoffset = true # >git 1.5
    [alias]
    s = status
    a = git add . && git status
    au = git add -u . && git status
    aa = git add . && git add -u . && git status
    a = !git add . && git status
    au = !git add -u . && git status
    aa = !git add . && git add -u . && git status
    c = commit
    cm = commit -m
    ca = commit --amend # careful
    ac = !git add . && git commit
    acm = !git add . && git commit -m
    l = log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
    ll = log --stat --abbrev-commit
    d = diff --color-words
  2. oli renamed this gist Jan 19, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. oli created this gist Jan 19, 2012.
    41 changes: 41 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    # ~/.gitconfig from @boblet
    # initially based on http://rails.wincent.com/wiki/Git_quickstart

    [core]
    excludesfile = /Users/oli/.gitignore
    legacyheaders = false # >git 1.5
    quotepath = false
    # http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
    pager = less -r
    # if ↑ doesn’t work, try: pager = less -+$LESS -FRX
    [color]
    ui = auto
    interactive = auto
    [repack]
    usedeltabaseoffset = true # >git 1.5
    [alias]
    s = status
    a = git add . && git status
    au = git add -u . && git status
    aa = git add . && git add -u . && git status
    c = commit
    cm = commit -m
    ca = commit --amend # careful
    l = log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
    ll = log --stat --abbrev-commit
    d = diff --color-words
    dh = diff --color-words head
    master = checkout master
    spull = svn rebase
    spush = svn dcommit
    alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t => \\2/' | sort
    [user]
    name = [name for commits]
    email = [email for commits]
    [github]
    user = [GH username]
    token = [API token from https://github.com/account/admin]
    [diff]
    # git does copy/rename *detection*. if you want it to track copies/renames:
    # http://stackoverflow.com/questions/1043388/record-file-copy-operation-with-git
    # renames = copies