Skip to content

Instantly share code, notes, and snippets.

@gotar
Created October 27, 2021 22:01
Show Gist options
  • Save gotar/21df482a71cce7763d902c27a486de0f to your computer and use it in GitHub Desktop.
Save gotar/21df482a71cce7763d902c27a486de0f to your computer and use it in GitHub Desktop.
[user]
name = Oskar Szrajer
email = oskarszrajer@gmail.com
[core]
editor = vim
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=4 -RFX
[alias]
br = branch
co = checkout
ci = commit
df = diff
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lgp = log -p
st = status -sb
sts = status --short
today = log --color --graph --pretty=format:'%Cred%h%Creset -%Creset %s' --abbrev-commit --author="Oskar" --since="6am"
standup = log --color --graph --pretty=format:'%s' --abbrev-commit --author="Oskar" --since yesterday
deploy-log = log --oneline --pretty=format:'- %h %an: %s (%ad)'
purr = pull --rebase
rename = commit --amend -m
add-forgotten = commit --all --amend --no-edit
wip = commit -am 'WIP'
fix = "!_() { c=$(git rev-parse $1) && git commit --fixup $c && if grep -qv \"No local changes\" <<<$(git stash); then s=1; fi; git -c core.editor=cat rebase -i --autosquash $c~; if [[ -n "$s" ]]; then git stash pop; fi; }; _"
update-from = "!f() { git fetch $1 --prune; git merge --ff-only $1/$2 || git rebase --preserve-merges $1/$2; }; f"
sync-all = fetch --all --prune
proddiff = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --no-merges origin/master ^production
[color]
branch = auto
diff = auto
status = auto
ui = true
[branch]
autosetuprebase = always
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin"]
push = HEAD
[push]
default = simple
[rerere]
enable = true
[diff]
tool = vimdiff
algorithm = patience
[merge]
tool = vimdiff
[difftool]
prompt = false
[init]
templatedir = ~/.git_template/template/
[github]
user = gotar
ssl = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment