Published at
Updated at
Reading time
1min

Today Bez Hermoso's git tip passed my Twitter timeline, and it's worth bookmarking it here on my blog.

Whenever you find yourself cd'ing around in a large project just to reach the root of a git repository, the following alias might come in handy.

alias gr='cd $(git rev-parse --show-toplevel)'

It automatically navigates you to the git repo root! 💪

Was this snippet helpful?
Yes? Cool! You might want to check out Web Weekly for more snippets. The last edition went out 18 days ago.

Related Topics

Related Articles

About the author

Stefan standing in the park in front of a green background

Frontend nerd with over ten years of experience, "Today I Learned" blogger, conference speaker, Tiny helpers maintainer, and DevRel at Checkly.