1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00
dotfiles/git/config
Joe Groocock ba6173e0ee
git: Dynamically identify the "default" branch
This broadly assumes that the "default" remote is called "origin", but
that's better than assuming that plus the default branch name.

Thanks to https://joshtronic.com/2020/08/09/how-to-get-the-default-git-branch/

Suggested-by: Chris Lane <chris@chrislane.com>
Signed-off-by: Joe Groocock <me@frebib.net>
2022-08-31 20:43:06 +00:00

70 lines
1.5 KiB
Plaintext

[user]
name = Joe Groocock
email = me@frebib.net
signingkey = CFBB6A86
[core]
autocrlf = input
excludesfile = /home/frebib/.config/git/gitignore
pager = diff-highlight | $PAGER
[init]
defaultBranch = master
[interactive]
diffFilter = diff-highlight
[commit]
gpgsign = true
[fetch]
prune = true
[push]
default = upstream
[pull]
rebase = true
prune = true
[merge]
ff = only
[rebase]
autoStash = true
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
[remote "upstream"]
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
[log]
date = iso8601-local
[format]
pretty = format:%h %Cblue%ad%Creset %ae %Cgreen%s%Creset
[alias]
verbs = !git log --pretty=format:'%s' | cut -d \" \" -f 1 | sort | uniq -c | sort -nr
pushall = !git remote | xargs -L1 git push
count = !echo $(pwd) && git rev-list HEAD --count
unpushed = !git log --oneline @{u}..HEAD
leaders = !git shortlog -s -n --all --no-merges
defbranch = !git symbolic-ref refs/remotes/origin/HEAD | sed \"s@^refs/remotes/origin/@@\"
[advice]
statusHints = false
pushUpdateRejected = false
detachedHead = false
[sendemail]
from = Joe Groocock <me@frebib.net>
smtpserver = smtp.zoho.com
smtpuser = me@frebib.net
smtpencryption = ssl
smtpserverport = 465
suppresscc = self
[diff]
algorithm = patience
[color]
ui = true
[color "diff"]
meta = cyan
frag = magenta
commit = yellow
old = red
new = green
whitespace = red 88 reverse
[color "diff-highlight"]
oldNormal = red
oldHighlight = red 88
newNormal = green
newHighlight = green 22
# vim: noet