From a script, how to determine the current GIT_DIR? If not overriden, it's just the top level dir or the top level dir of a bare repo.
I want something like:
[/git/repo1/subdir]$ git show-git-dir
/git/repo1/.git
This can be done with rev-parse:
git rev-parse --git-dir
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With