This simple trick allows to retrieve GIT_ROOT or PROJECT_ROOT from anywhere within the project folder structure. Whenever it’s needed, just use this:
export GIT_ROOT=$(realpath $(git rev-parse --git-dir)/..)
cd $GIT_ROOT;
![Follow us on Facebook Facebook](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/facebook.png)
![Follow me on Twitter twitter](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/twitter.png)
![feather](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/icon.png)
Share me:
![Share on Facebook Facebook](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/facebook.png)
![Share on Twitter twitter](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/twitter.png)
![Share on Reddit reddit](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/reddit.png)
![Share by email mail](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/mail.png)
![feather](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/icon.png)
Software in theory and practice: tips, tricks n' philosophy
Comments are closed.