From effb85ed2e011209369af6be5e61f20c8f2a82f5 Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Fri, 24 Jul 2020 10:24:19 -0600 Subject: Tweak git aliases to use main as the default branch --- base/gitconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'base/gitconfig') diff --git a/base/gitconfig b/base/gitconfig index 3db3b5a..1461a1d 100644 --- a/base/gitconfig +++ b/base/gitconfig @@ -52,7 +52,8 @@ untracked = red [alias] - this = !bash -c 'git root &>/dev/null && echo "Already a git repository" || (git init && git add . && git commit -m \"Initial commit\")' + new = "!git init && git symbolic-ref HEAD refs/heads/main" + this = !bash -c 'git root &>/dev/null && echo "Already a git repository" || (git new && git add . && git commit -m \"Initial commit\")' root = rev-parse --show-toplevel cloner = clone --recursive rv = remote -v -- cgit v1.2.3-70-g09d2