aboutsummaryrefslogtreecommitdiff
path: root/base/gitconfig
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2020-07-24 10:24:19 -0600
committerAdam Hovorka <[email protected]>2020-07-24 10:24:19 -0600
commiteffb85ed2e011209369af6be5e61f20c8f2a82f5 (patch)
tree53d120cff1000a60969cf59d85b8ebea4aab5cb2 /base/gitconfig
parent45a7c06933af0443f4a79592cc1a1583b19a70c9 (diff)
Tweak git aliases to use main as the default branch
Diffstat (limited to 'base/gitconfig')
-rw-r--r--base/gitconfig3
1 files changed, 2 insertions, 1 deletions
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