From e495948098b77c68d351d9b7b125d5ac87f676c4 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sat, 19 Nov 2022 11:29:45 -0500 Subject: [PATCH] Feat/git aliases (#3) * feat: prune refs on fetch * feat: base git aliases feat: aliases --- git_config | 4 ++++ source/aliases | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/git_config b/git_config index da2e75b..156283c 100644 --- a/git_config +++ b/git_config @@ -1,3 +1,7 @@ #!/bin/bash +# Always sign commits. git config --global commit.gpgsign true + +# Prune stale refs on fetch. +git config --global fetch.prune true diff --git a/source/aliases b/source/aliases index 5347ebe..0d75636 100644 --- a/source/aliases +++ b/source/aliases @@ -18,3 +18,25 @@ alias tm="tmux new -s $1" # All roads lead to nvim. alias vim=nvim alias v=nvim + +############### +# git-related # +############### + +unalias mgs 2>/dev/null +alias mgs="git status" + +unalias mgf 2>/dev/null +alias mgf="git fetch" + +unalias mgc 2>/dev/null +alias mgc="git commit" + +unalias mgp 2>/dev/null +alias mgp="git push" + +unalias mgcb 2>/dev/null +alias mgcb="git branch --show-current" + +unalias mgl 2>/dev/null +alias mgl="git log"