Skip to content

Instantly share code, notes, and snippets.

@klimesf
Last active July 7, 2022 08:13
Show Gist options
  • Save klimesf/f2c381bc58b6cd8c8d6e304b8bf99c46 to your computer and use it in GitHub Desktop.
Save klimesf/f2c381bc58b6cd8c8d6e304b8bf99c46 to your computer and use it in GitHub Desktop.
Global git config
[credential]
helper = store
[init]
defaultBranch = master
[core]
whitespace = fix,-indent-with-non-tab,space-before-tab,trailing-space,cr-at-eol
autocrlf = input
filemode = false
editor = vim
excludesfile = /Users/filip/.gitignore
[branch]
autosetuprebase = always
[diff]
algorithm = histogram
mnemonicprefix = true
renames = copies
compactionHeuristic = true
indentHeuristic = true # default from 2.18m
renameLimit = 33554432
[push]
default = current
[pull]
rebase = true
[advice]
statusHints = false
pushNonFastForward = false
[remote]
pushdefault = origin
[rebase]
abbreviateCommands = true
[commit]
gpgsign = true
[alias]
a = add
co = checkout
cp = cherry-pick
st = status
ap = add -p
ci = commit
qci = commit
cia = commit --amend
rb = rebase
rbi = rebase -i --autosquash
rba = rebase --abort
rbc = rebase --continue
rbs = rebase --skip
br = branch -v
b = branch -v
d = diff
dc = diff --cached
dw = diff --word-diff
mb = merge --no-ff
ff = merge --ff-only
f = fetch
fetch = fetch --all --prune
fpush = push --force-with-lease
log = log --show-signature
l = log --graph --decorate --oneline --all --no-merges
lol = log --graph --oneline --decorate
ls = "log --stat -m"
lp = "l -p"
lw = "l -p --color-words"
g = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset %C(magenta)(%G?: %GS)%Creset' --abbrev-commit --date=relative
gp = "g -p"
gw = "g -p --color-words"
gs = "g --stat"
assume-unchanged = "update-index --assume-unchanged"
assume-changed = "update-index --no-assume-unchanged"
up = "!git stash && git fetch && git pull upstream"
pu = "up && git push upstream master"
k = !gitk
start = !git init && git commit --allow-empty -m "Initial commit"
wip = !git add --all && git commit -m WIP
unwip = reset HEAD~1
cif = !git commit --fixup=$(git-log-vgrep-most-recent-commit 'fixup!')
find = !sh -c 'git ls-tree -r --name-only HEAD | grep --color $1' -
cf = show --pretty="format:" --name-only
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
#*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
#*.sql
#*.sqlite
# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
# IDE generated files #
#######################
.project
.idea
*.iml
# Other #
#########
.svn
.buildpath
venv/
# Temp files #
##############
xxx_*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment