Skip to content

Instantly share code, notes, and snippets.

@slomek
Last active March 13, 2023 09:44
Show Gist options
  • Save slomek/dad9fb5f630a804f8e3f0a80028af3b2 to your computer and use it in GitHub Desktop.
Save slomek/dad9fb5f630a804f8e3f0a80028af3b2 to your computer and use it in GitHub Desktop.
.gitconfig
[alias]
st = status -sb
plog = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
plog10 = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -n 10
fp = fetch --prune
pl = pull --rebase
wtf = log --branches --not --remotes --simplify-by-decoration --decorate --oneline
todel = log --branches --not --simplify-by-decoration --decorate --oneline
cam = commit -am
bump = !git-bump-semver
A = add -A
a = add
aa = add --all
ae = add --edit
ai = add --interactive
amend = commit --amend -C HEAD
ap = add --patch
au = add --update
authors = "!git log --pretty=format:%aN | sort | uniq -c | sort -rn"
b = branch
bdf = "!git branch -d `git branch | fzf`"
bdff = "!git branch -D `git branch | fzf`"
bm = branch --merged master
c = commit
ca = commit --amend
cam = commit -am
changes = diff --name-status -r
cm = commit --message
co = checkout
cof = "!git checkout `git branch --sort=-committerdate | fzf`"
caf = "!git checkout `git b -a --sort=-committerdate | fzf | sed 's#remotes/origin/##'`"
cpc = cherry-pick
d = diff
dc = diff --cached
div = divergence
ds = diff --staged
fu = fetch upstream
mud = merge upstream/develop
h = help
irb = rebase --interactive
l = log --oneline --decorate
lg = log --graph --pretty=format:'%Cred%h%Creset %an -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
ls-ignored = ls-files --exclude-standard --ignored --others
m = merge
mm = merge --no-ff
msg = commit --allow-empty -m
p = cherry-pick -s
pick = cherry-pick
pom = push origin master
pofm = push origin HEAD:refs/for/master
pofd = push origin HEAD:refs/for/develop
pod = push origin develop
prune-remotes = "!for remote in `git remote`; do git remote prune $remote; done"
push = push --tags
pushv = push --tags --no-verify
r = remote
ra = !git log --graph --abbrev-commit --date=relative -20 --all --pretty='format:%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbs = rebase --skip
rh = reset --hard
ru = remote update --prune
s = status --short --branch
sl = shortlog
sm = submodule
sma = submodule add
smu = submodule update --init
#st = stash
stl = stash list
stp = stash pop
tagcommit = !sh -c 'git rev-list $0 | head -n 1'
tree = log --graph --pretty=oneline --decorate
undo = reset --soft HEAD^
wd = diff --color-words
wds = diff --color-words --staged
bmd = !git bm | grep -vi "master" | xargs git b -d
[push]
default = simple
[core]
editor = vim
excludesfile = ~/.gitignore
[user]
name = Paweł Słomka
email = pslomka@pslomka.com
# signingkey = A2E523C331B1A81A
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = true
pager = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold strike
new = green bold
[color "status"]
added = yellow
changed = magenta
untracked = cyan
[help]
autocorrect = 0
[apply]
whitespace = nowarn
[merge]
tool = diffmerge
[mergetool "diffmerge"]
cmd = diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
trustexitcode = false
[mergetool]
keepBackup = false
[diff]
tool = diffmerge
renames = copies
mnemonicprefix = true
[difftool]
prompt = false
[difftool "diffmerge"]
cmd = diffmerge \"$LOCAL\" \"$REMOTE\"
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[url "git@github.com:"]
insteadOf = https://github.com/
[gpg]
program = gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment