From 1e06e9163cd21043ed615c41284b6f8dc1987a79 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 12 Aug 2022 13:00:57 +0100 Subject: [PATCH] Adds shortcut to jump to git repo base --- zsh/aliases/git.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zsh/aliases/git.zsh b/zsh/aliases/git.zsh index f4bfe06..6b67045 100644 --- a/zsh/aliases/git.zsh +++ b/zsh/aliases/git.zsh @@ -61,6 +61,9 @@ function gplfs() { git lfs push origin "$(git_current_branch)" --all } +# Navigate back to project root (where .git is) +alias gx='cd $(git rev-parse --show-toplevel)' + # Shorthand clone (e.g. $ clone lissy93/dotfiles) function clone { default_service='github.com' # Used if full URL isn't specified