Skip to content

Commit b6eacb3

Browse files
committed
git: mention rev-parse --show-cdup and GIT_DIR as workarounds
1 parent ca0e38e commit b6eacb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web/docs/git.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ They depend on Tcl/Tk and we only provide mingw builds for those. In all environ
2020

2121
### Some tool I use fails to work with the git in MSYS2, but works fine with the official one
2222

23-
One common issue with external tools integrating git, is that they get confused by Unix paths, for example when figuring out the project root path via `git rev-parse --show-toplevel`. This can be worked around by using `git rev-parse --show-prefix` instead which outputs a relative path from the root to the current working directory, which is both a valid Unix and Windows path.
23+
One common issue with external tools integrating git, is that they get confused by Unix paths, for example when figuring out the project root path via `git rev-parse --show-toplevel`. This can be worked around by using `git rev-parse --show-prefix` instead which outputs a relative path from the root to the current working directory, which is both a valid Unix and Windows path. Or `git rev-parse --show-cdup` which outputs a relative path from the current working directory to the root, which is also a valid Unix and Windows path.
24+
25+
If all fails you can `export GIT_DIR=/dev/null` to make git not find any repository at all, which usually makes tools skip any git related logic.

0 commit comments

Comments
 (0)