The code in question displays GIT_DIR! if the user is inside the .git directory of a repository that has a working directory. Several git commands won't work in that situation, so it's useful to warn the user.
The code in question displays GIT_DIR! if the user is inside the .git directory of a repository that has a working directory. Several git commands won't work in that situation, so it's useful to warn the user.