From 912dfa56d4f7f4dd3e1591ea91d711bdc6e8d4e5 Mon Sep 17 00:00:00 2001 From: Leonora Tindall Date: Thu, 3 Jul 2025 09:55:35 -0500 Subject: [PATCH] Add git aliases --- rcfiles/zshrc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/rcfiles/zshrc b/rcfiles/zshrc index 91993b5..907a5b3 100644 --- a/rcfiles/zshrc +++ b/rcfiles/zshrc @@ -6,7 +6,7 @@ function current_dir() { else current_dir=${current_dir##*/} fi - + echo $current_dir } @@ -33,6 +33,21 @@ if [[ -n $ZELLIJ ]]; then add-zsh-hook preexec set_tab_to_command_line fi +# git aliases + +function git_aliases() { + echo "git aliases:" + echo "\tgs: status -sb" + echo "\tgl: log --oneline" + echo "\tglast: log -1 HEAD --stat" + echo "\tgds: diff --staged" +} + +alias gs="git status -sb" +alias gl="git log --oneline" +alias glast="git log -1 HEAD --stat" +alias gds="git diff --staged" + # load Cargo if [ -f "$HOME/.cargo/env" ]; then . "$HOME/.cargo/env"