Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: d1f8768016
Fetching contributors…

Cannot retrieve contributors at this time

95 lines (83 sloc) 3.315 kB
name = Matthew Lyon
user = mattly
; the 'hub' command pulls from $GITHUB_TOKEN
; don't set it here, break anything that requires it to here
; and the complain to the maker of said thing that they suck
; token = !sh -c 'echo $GITHUB_TOKEN'
ui = auto
[merge "gemfilelock"]
name = relocks the gemfile.lock
driver = bundle lock
[merge "compass"]
name = recompile the sass files
driver = rake compass
renames = copies
[diff "ruby"]
funcname="^ *\\(\\(class\\|module\\|def\\) .*\\)"
pretty="format:%Cred%ae %Creset- %C(yellow)%h %s %Creset(%ar)"
# amend to the last commit
amend = commit --amend -C HEAD
# add only part of the commit to index
addp = add --patch
# search through the log
axe = !sh -c 'git log -S"$0"'
# show all branches, even across remotes
branches = branch -a --color -v
# remove all local branches included in the current branch
cleanup = !sh -c 'git branch --merged | grep -E "^[^*]" --exclude "^\\s*master" | xargs -n1 git branch -d'
# removes remote branches that have been merged into HEAD
cleanup-remotes = !"f() { git branch -r --merged | cut -d \\ -f 3 | while read branch; do test `git rev-parse $branch` == `git rev-parse HEAD` && echo \"skipping branch $branch\" || (echo \"deleting branch $branch\" && echo $branch | sed 's/\\//\\ :/' | xargs -t git push ); done }; f"
# shallow clone a repository, because we don't care about history
clone-shallow = clone --depth 1
# delete a remote branch
delete = !sh -c 'git push "$0" :refs/heads/"$1"'
# merge the branch, keeping its commits in their own branch
fold = merge --no-ff
# put this branch at a particular ref
goto = reset --hard
# set an ignore pattern
ignore = !"f () { local ignore_file=$( git rev-parse --show-cdup ).gitignore arg; for arg in $*; do echo $arg >> $ignore_file; done; sort -u -o $ignore_file $ignore_file; }; f"
# set a tag
label = tag -a
# mirror branches (including deletions) and tags
mirror = push --mirror
# show commits that haven't been pushed to the remote yet
new-pull-request = !open \"$(git config remote.$(git config github.user).url |sed s/ |sed s/.git//)/pull/new/$(git name-rev --name-only HEAD)\"
pending = !sh -c 'git --no-pager log "$0"/HEAD..HEAD && echo'
# interactive rebase
ri = rebase --interactive --autosquash
# diff the index against the previous commit
staged = diff --cached
# better status
stat = status -sb
# update all submodules
submodule-pull = submodule foreach "git checkout master && git pull origin master"
# tags a release with 'release/YYYY-MM-DD-HH-MM-SS'
tag-release = !sh -c 'git tag release/`date +%Y/%m/%d/%H%M`'
# track a remote branch
track = checkout -t
# remove a file from the index
unstage = reset HEAD --
# pull changes, show commits since last pull/push
up = !sh -c 'git pull "$0" HEAD && git log --pretty=format:\"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)\" HEAD@{1}..'
# update all remotes, pruning removed tracking branches
update-remotes = remote update --prune
Jump to Line
Something went wrong with that request. Please try again.