Skip to content

Instantly share code, notes, and snippets.

@tiegz
Forked from ktheory/.gitconfig
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save tiegz/c4eadc6a73fd12d671b0 to your computer and use it in GitHub Desktop.

Select an option

Save tiegz/c4eadc6a73fd12d671b0 to your computer and use it in GitHub Desktop.

Revisions

  1. tiegz revised this gist May 5, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@
    d = diff
    cp = cherry-pick
    pl = pull

    f = fetch

    # Logging
    l = log --pretty=format:'%C(yellow)%h%Creset - %C(green)%an%Creset %C(cyan)%d %C(reset)%s %Cgreen(%cr)%Creset' --graph
  2. tiegz revised this gist May 5, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Inspired by https://github.com/gabebw/dotfiles/blob/master/gitconfig.erb
    [user]
    name = Aaron Suggs
    name = Tieg Zaharia
    email = XXX
    [core]
    excludesfile = ~/.gitignore
  3. @ktheory ktheory created this gist May 5, 2014.
    100 changes: 100 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,100 @@
    # Inspired by https://github.com/gabebw/dotfiles/blob/master/gitconfig.erb
    [user]
    name = Aaron Suggs
    email = XXX
    [core]
    excludesfile = ~/.gitignore
    [apply]
    whitespace = nowarn
    [diff]
    color = auto
    [pager]
    color = true
    [status]
    color = auto
    [alias]
    # Save keystrokes
    m = checkout master
    ci = commit -a
    ca = commit --amend
    co = checkout
    st = status
    br = branch
    b = branch
    c = clone
    d = diff
    cp = cherry-pick
    pl = pull


    # Logging
    l = log --pretty=format:'%C(yellow)%h%Creset - %C(green)%an%Creset %C(cyan)%d %C(reset)%s %Cgreen(%cr)%Creset' --graph
    lg = log --pretty=format:'%C(yellow)%h%Creset - %C(green)%an%Creset %C(cyan)%d %C(reset)%s %Cgreen(%cr)%Creset' --stat
    fat-snake = log --pretty=format:'' --graph
    r = !git l -30
    ra = !git r --all
    la = !git l --all
    rom = rebase origin/master

    # When I'm confused about changes that are staged
    huh = diff HEAD


    # The best way to pull
    plr = pull --rebase
    plre = pull --rebase
    up = !git fetch origin && git rebase origin/master
    ps = push
    publish = "!f() { git push -u origin `git rev-parse --abbrev-ref head`; }; f"
    ss = log -n 1 --format="%h" # Show short sha
    pb = !git log -n 1 --format="%H" -z | pbcopy # Copy sha to pasteboard
    x = !github
    hub = !github
    smu = !git submodule sync && git submodule update --init
    backout = reset head^

    # Handy for publishing gems
    # git release v1.0.0
    release = "!f() { git tag -a -m $1 $1 && git push origin tag $1; }; f"

    [color]
    branch = auto
    diff = auto
    status = auto
    [color "branch"]
    current = yellow reverse
    local = yellow
    remote = green
    [color "diff"]
    meta = yellow bold
    frag = magenta bold
    old = red bold
    new = green bold
    [color "status"]
    added = yellow
    changed = green
    untracked = cyan
    [diff]
    # For Github-style word diffs
    wordRegex = [^[:space:]]
    [github]
    user = ktheory
    token = XXX
    [gitflow]
    base = master
    release = release
    [push]
    default = simple
    [branch]
    autosetuprebase = always
    [url "git://github.com/"]
    # Read-only
    insteadOf = gh:
    [url "[email protected]:"]
    # With write access
    insteadOf = wgh:
    [credential]
    helper = osxkeychain
    [filter "media"]
    clean = git-media-clean %f
    smudge = git-media-smudge %f