[include] path = ~/.config/git/config.d/local.inc [user] email = tobyv13@gmail.com name = Toby Vincent username = tobyvin signingkey = 0xA0876F29023F43AF [sendemail] smtpserver = smtp.gmail.com smtpuser = tobyv13@gmail.com smtpencryption = tls smtpserverport = 587 [commit] gpgsign = true [init] defaultBranch = main [push] autoSetupRemote = true followTags = true [pull] rebase = true [merge] ff = only [fetch] prune = true [diff] colorMoved = default [merge] tool = nvimdiff [mergetool "nvimdiff"] layout = "MERGED" [trailer] separators = ":#" [trailer "fix"] key = "Fix #" [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true [alias] # basic st = status -u cl = clone ci = commit co = checkout br = branch r = reset rv = remote -v cp = cherry-pick pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" dev = checkout develop main = checkout main # tweak defaults grep = grep -Ii diff = diff --word-diff branch = branch -ra # shortcuts ai = add --interactive recommit = commit --amend -C HEAD redate = rebase --committer-date-is-author-date # log commands lg = log --graph --oneline --decorate --branches --remotes --tags --abbrev-commit ll = log --stat --oneline --decorate --branches --remotes --tags --abbrev-commit # undo http://megakemp.com/2016/08/25/git-undo/ undo = "!f() { git reset --soft $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f" pop = git reset HEAD~ # stash staged files stashindex = !git stash --keep-index && git stash && git stash apply stash@{1} && git stash show -p | git apply -R && git stash drop stash@{1} # generate git artifacts ignore = "!f() { IFS=\",\"; curl -L -s \"https://www.toptal.com/developers/gitignore/api/$*\" ;}; f"