类型 .git\HEAD 在 Git Bash 中不起作用 Windows 10

type .git\HEAD doesn't work in Git Bash of Windows 10

我想在 Windows 10 的 Git Bash 中使用此命令 type .git\HEAD,但我刚得到这个:-

bash: type: .gitHEAD: not found

但是头文件确实存在于文件夹.git下。我也尝试了 type .git/HEADtype .git\HEAD,但没有成功。

我怎样才能解决这个问题?

在 bash 会话中,尝试改为:

cat .git/HEAD

那应该 return 类似于:

ref: refs/heads/master

cat 是类似 Unix 命令的 type, which originated as an internal command in 86-DOS.
git bash 会话中的默认路径不包括 system32 命令,如“type command not working as expected on Git Bash

中所述