From edfb2fbd54a13eb5458d76f36f44312ac3c48671 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Sat, 27 Nov 2021 18:43:33 +0100 Subject: [PATCH] chore(git): add global configuration and ignore --- .dotbot.conf.yaml | 2 + gitconfig | 98 +++++++++++++++++++++++++++++++++++++++++++++++ gitignore | 13 +++++++ 3 files changed, 113 insertions(+) create mode 100644 gitconfig create mode 100644 gitignore diff --git a/.dotbot.conf.yaml b/.dotbot.conf.yaml index f6ac10c..0c8f95b 100644 --- a/.dotbot.conf.yaml +++ b/.dotbot.conf.yaml @@ -9,6 +9,8 @@ ~/.ag: ag ~/.ctags: ctags ~/.editorconfig: editorconfig + ~/.gitconfig: gitconfig + ~/.gitignore: gitignore ~/.wget: wget ~/.zshrc: zshrc diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..21f884f --- /dev/null +++ b/gitconfig @@ -0,0 +1,98 @@ +[user] + useConfigOnly = true +[include] + path = ~/.gitconfig.local +[help] + autocorrect = 1 +[core] + editor = code --wait + excludesfile = ~/.gitignore + legacyheaders = false + whitespace = trailing-space,space-before-tab +[alias] + st = status + ci = commit + co = checkout + br = branch + rb = rebase + cp = cherry-pick + dt = difftool + hist = log --color --graph --decorate --abbrev-commit --date=short --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(blue)[%an]%Creset' --abbrev-commit -- + ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate + local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }' + stats = shortlog -sn --all --no-merges + today = log --since=00:00:00 --all --no-merges --oneline + prune = fetch --prune + undo = reset --soft HEAD^ + stash-all = stash save --include-untracked + app-status = !git remote update >/dev/null && git --no-pager log origin/production..origin/master --pretty=oneline >&2 | pbcopy + unstage = "reset HEAD --" + merged = "branch --merged" + unmerged = "branch --no-merge" + branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes + ignored = "ls-files --others --directory" + assume = "update-index --assume-unchanged" + unassume = "update-index --no-assume-unchanged" + assumed = "!git ls-files -v | grep ^h | cut -c 3-" + unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged" + assumeall = "!git st -s | awk {'print $2'} | xargs git assume" +[apply] + whitespace = fix +[color] + status = auto + diff = auto + branch = auto + interactive = auto + ui = 1 +[push] + default = upstream + followTags = true +[status] + showUntrackedFiles = all +[transfer] + fsckobjects = true +[i18n] + commitencoding = UTF-8 + logoutputencoding = UTF-8 +[repack] + usedeltabaseoffset = true +[branch] + autosetupmerge = true + sort = -authordate +[diff] + tool = Kaleidoscope + algorithm = patience +[difftool] + prompt = false +[difftool "Kaleidoscope"] + cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\" +[merge] + tool = Kaleidoscope +[mergetool] + prompt = false + keepBackup = false +[mergetool "Kaleidoscope"] + cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot + trustexitcode = true +[mergetool "code"] + cmd = "code $MERGED" + keepBackup = false + trustexitcode = true +[pager] + diff = +[rebase] + autosquash = true +[rerere] + enabled = 1 +[fetch] + prune = true + fsckobjects = false +[filter "lfs"] + required = true + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + clean = git-lfs clean -- %f +[web] + browser = open +[hub] + host = source.xing.com diff --git a/gitignore b/gitignore new file mode 100644 index 0000000..296a2de --- /dev/null +++ b/gitignore @@ -0,0 +1,13 @@ +*.lnk +*.pyc +*.pyo +*.session +*.sw[nop] +.BridgeSort +.DS_Store +._* +.agignore +.bundle/ +m~ +tags +