zsh/git: add alias to go back to root dir
This commit is contained in:
parent
3a5bbecd6c
commit
11fda8a235
@ -70,6 +70,7 @@
|
||||
up = pull --rebase --autostash
|
||||
rebaseour = "rebase -Xours"
|
||||
rank = "shortlog -s -n --no-merges"
|
||||
root = rev-parse --show-toplevel
|
||||
[rebase]
|
||||
# when rebasing, update the other common branch too.
|
||||
# See https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/
|
||||
|
@ -65,3 +65,9 @@ alias -g S='&> /dev/null &'
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
alias senv='source ~/venv/bin/activate'
|
||||
alias r='if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) != 'true' ]]; then
|
||||
>&2 echo "Not a git repository"
|
||||
return 1
|
||||
else
|
||||
cd $(git root)
|
||||
fi'
|
||||
|
Loading…
Reference in New Issue
Block a user