Created
April 11, 2014 07:22
-
-
Save huydx/10446503 to your computer and use it in GitHub Desktop.
.gitconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
pager = less | |
editor = vim | |
[alias] | |
ci = commit -v | |
st = status | |
di = diff | |
co = checkout | |
br = branch | |
l = log --date=local | |
lp = log --date=local -p | |
ls = log --stat | |
find-rev = "!sh -c 'git log -1 --grep=\"^git-svn-id: [^ ]*@${1#r} \" --format=%H' _" | |
show-rev = "!sh -c 'git log -1 --grep=\"^git-svn-id: [^ ]*@${1#r} \" -p' _" | |
#http://gcc.gnu.org/wiki/GitMirror | |
sr = svn rebase | |
sci = svn dcommit | |
# The current branch. | |
cbr = "!f(){ expr $( ( git symbolic-ref -q HEAD || cat $(git dir)/rebase-merge/head-name ) 2>/dev/null ) : 'refs/heads/\\(.*\\)'; }; f" | |
# The branch being tracked by the current branch. | |
track = "!f() { if p=$(git rev-parse --symbolic-full-name '@{u}' 2>/dev/null); then echo origin/${p##*/}; else git svn info|sed -n 's,^URL.*gcc/\\(branches/\\)\\?\\(.*\\),origin/\\2,p'; fi; }; f" | |
# Show all the local commits on this branch. | |
lg = "!git log -p `git track`.." | |
# Write all the local commits to ~/patch, filtering out modifications to ChangeLog files | |
lgp = "!git log -p `git track`.. | filterdiff -x '*/ChangeLog' | sed -e '/^diff.*ChangeLog/{N;d}' > ~/patch" | |
# Show all the local changes on this branch as one big diff. | |
df = "!git diff $(git merge-base $(git track) HEAD)" | |
dfc = diff --cached | |
# Reorganize the local commits on this branch. | |
rb = "!git rebase -i `git track`" | |
rc = rebase --continue | |
rs = rebase --skip | |
# 'git rmerge mybranch' to reintegrate a temporary branch onto the top of the current branch | |
rmerge = "!f(){ cur=`git cbr`; git rebase $cur $1; git rebase $1 $cur; }; f" | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto | |
[merge "merge-changelog"] | |
name = GNU-style ChangeLog merge driver | |
driver = /usr/local/bin/git-merge-changelog %O %A %B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment