Skip to content

Instantly share code, notes, and snippets.

@AndyBold
Created March 15, 2021 17:29
Show Gist options
  • Save AndyBold/6ad70edde2c4b860db7e2d28f6991b69 to your computer and use it in GitHub Desktop.
Save AndyBold/6ad70edde2c4b860db7e2d28f6991b69 to your computer and use it in GitHub Desktop.
A handy shortcut that let's you do things like `cd $(git root)` to get back to the root of the current repo being worked in.
git config --global alias.root 'rev-parse --show-toplevel'
# Then
git root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment