diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 5517cf9..58d3ef3 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -4,10 +4,15 @@ alias ga='git add .; git commit --no-edit --amend; git push --force-with-lease' alias gae='git add .; git commit --amend; git push --force-with-lease' gd() { curr_branch=$(git symbolic-ref --short -q HEAD) + if [ $curr_branch = "master" ]; then + echo "On master, aborting." + return + fi git checkout master git branch -D ${curr_branch} git pull } +alias gl="git log --graph --abbrev-commit --date=short --pretty=format:'%Cred%h%Creset %Cgreen%cr%Creset: %s : %C(bold blue)%an%Creset %C(yellow)%d%Creset'" alias less='less -R'