Skip to content

Instantly share code, notes, and snippets.

@bsara bsara/.gitconfig
Last active Nov 1, 2017

What would you like to do?
Standard .gitconfig sections
autosetuprebase = always
autocrlf = false
ignorecase = false
default = simple
default = simple
a = add
aa = add -A
ai = add --interactive
b = branch
br = branch -r
f = fetch
ps = push
pl = pull
plr = pull -r
c = commit
co = checkout
cp = cherry-pick
cpa = cherry-pick --abort
cpc = cherry-pick --continue
m = merge
rb = rebase
rba = rebase --abort
rbc = rebase --continue
s = status
sm = submodule
smu = submodule update --init
smur = submodule update --init --recursive
t = tag
rv = !git stash && git stash drop
pr = remote update --prune
rmb = !sh -c 'git push origin :refs/heads/$1 && git branch -D $1' -
rmt = !sh -c 'git push origin :refs/tags/$1 && git tag -d $1' -
mg = mergetool
d = difftool
df = diff --name-status
dw = diff -w
clog = !git log --oneline --no-decorate --graph v1.41.0..HEAD
l = log --abbrev-commit --first-parent --pretty=format:'%C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)'
ll = log --abbrev-commit --graph --pretty=format:'%C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)'
ld = log --abbrev-commit --first-parent --pretty=format:'%C(bold blue)%ai%C(reset) - %C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)'
lda = log --abbrev-commit --graph --pretty=format:'%C(bold blue)%ai%C(reset) - %C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)'
la = log --abbrev-commit --name-status --first-parent --pretty=format:'%C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)'
lla = log --abbrev-commit --name-status --pretty=format:'%C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)'
lg = !git lg1
lg1 = !git lg1-specific --all
lg2 = !git lg2-specific --all
lg3 = !git lg3-specific --all
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
tool = meld
[diff "exif"]
binary = true
cachetextconv = true
textconv = exiftool
[diff "docx"]
binary = true
textconv = docx2txt
[diff "odt"]
binary = true
textconv = odt2txt
[difftool "intellij"]
cmd = idea diff "$LOCAL" "$REMOTE"
tool = meld
conflictstyle = diff3
[mergetool "meld"]
cmd = meld "$LOCAL" "$MERGED" "$REMOTE"
[mergetool "intellij"]
cmd = idea merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.