# vim:ft=gitconfig # ~/.gitconfig # ============================================================================ # This Git configuration contains sane defaults for my workflow. # I work with Git on Windows and Linux, and some configuations might # use different locations. This mainly contains the aliases I want # to keep consistent between machines. {{/* This file supports Go's text/template language. */ -}} [init] defaultBranch = main [push] autoSetupRemote = true default = current [user] name = {{ .git_name }} email = {{ .git_email }} [alias] staash = stash --all trueblame = blame -w -C -C -C wdiff = diff --word-diff fpush = push --force-with-lease sdiff = diff --staged nadd = add -N . padd = add -p . undostage = restore --staged . # Just for the memes fixed = commit --amend --no-edit gud = push --force-with-lease rekt = !git reset --hard && git clean -df [rerere] enabled = true autoUpdate = true [branch] sort = committerdate {{ if eq .chezmoi.os "windows" -}} [credential "https://github.com"] helper = helper = !'C:\\Users\\muftei\\scoop\\apps\\gh\\current\\bin\\gh.exe' auth git-credential [credential "https://gist.github.com"] helper = helper = !'C:\\Users\\muftei\\scoop\\apps\\gh\\current\\bin\\gh.exe' auth git-credential {{ else }} [credential "https://github.com"] helper = helper = !/usr/bin/gh auth git-credential [credential "https://gist.github.com"] helper = helper = !/usr/bin/gh auth git-credential {{ end -}} [pull] rebase = true