Skip to content

Instantly share code, notes, and snippets.

@rngtng
Created September 6, 2011 11:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rngtng/1197293 to your computer and use it in GitHub Desktop.
Save rngtng/1197293 to your computer and use it in GitHub Desktop.
git alias
[color]
ui = auto
[pack]
threads = 0
[core]
excludesfile = ~/.environment/gitignore
quotepath = false
#[branch]
# autosetuprebase = always
[alias]
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
alias = !sh -c '[ $ = 2 ] && git config --global alias.\"$1\" \"$2\" && exit 0 || git aliases && exit 1' -
#https://git.wiki.kernel.org/index.php/Aliases
changes-in = !sh -c 'git log \"..$1\" --no-merges --format=\"%h | Author: %an | %ad | %s\" --date=local' -
changes-out = !sh -c 'git log \"$1\".. --no-merges --format=\"%h | Author: %an | %ad | %s\" --date=local' -
# See http://stackoverflow.com/questions/53569/how-to-get-the-changes-on-a-branch-in-git
branch-name = !git branch 2>/dev/null | grep -e ^* | tr -d '* '
branch-rename = !git branch -m `git branch-name` $1
branch-delete = branch -d
branch-new = checkout -b
branch-checkout = !sh -c 'git checkout --track -b \"$1\" \"origin/$1\"' -
compare = !open https://github.com/soundcloud/soundcloud/compare/`git branch-name`
builder = !open http://builder.soundcloud.com/view/All/job/soundcloud_`git branch-name`_specs_001
edit-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; mate `f`"
add-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
undo-last-commit = reset --soft HEAD^
kill-last-commit = reset --hard HEAD^
stash-show = !git stash show -p stash@{$1}
st = status
co = checkout
b = branch
ci = commit
track = !git branch --set-upstream `git branch-name` origin/`git branch-name`
pp = !git pull && git push
hub = !hub
[push]
default = current
[branch]
autosetupmerge = true
autosetuprebase = always
[pivotal]
api-token = <>
full-name = <>
integration-branch = merge-stage
only-mine = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment