Change Directory to Git Root Directory

sunday-snippet · Mar 20, 2022 · ~1 min
Sunday Snippet #9 change directory to git root directory
Sunday Snippet #9 change directory to git root directory
1
2
3
4
5
$ pwd
/tmp/bjora-project/backend/scripts/docker
$ cd `git rev-parse --show-toplevel`
$ pwd
/tmp/bjora-project/backend
· · ·

Love This Content?

Any kind of supports is greatly appreciated! Kindly support me via Bitcoin, Ko-fi, Trakteer, or just continue to read another content. You can write a response via Webmention and let me know the URL via Telegraph.

Drop Your Comment Below