Git 2.28 now has a setting to change the default branch for new repositories. This sets init.defaultBranch to main and removes the HEAD file from the git template. The HEAD file will need to be removed from ~/.git_template manually, as rcup does not remove deleted files. https://github.blog/2020-07-27-highlights-from-git-2-28/#introducing-init-defaultbranch
30 lines
643 B
Text
30 lines
643 B
Text
[init]
|
|
defaultBranch = main
|
|
templatedir = ~/.git_template
|
|
[push]
|
|
default = current
|
|
[color]
|
|
ui = auto
|
|
[alias]
|
|
aa = add --all
|
|
ap = add --patch
|
|
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
|
|
ci = commit -v
|
|
co = checkout
|
|
pf = push --force-with-lease
|
|
st = status
|
|
[core]
|
|
excludesfile = ~/.gitignore
|
|
autocrlf = input
|
|
[merge]
|
|
ff = only
|
|
[commit]
|
|
template = ~/.gitmessage
|
|
[fetch]
|
|
prune = true
|
|
[rebase]
|
|
autosquash = true
|
|
[include]
|
|
path = ~/.gitconfig.local
|
|
[diff]
|
|
colorMoved = zebra
|