【问题标题】:type .git\HEAD doesn't work in Git Bash of Windows 10类型 .git\HEAD 在 Windows 10 的 Git Bash 中不起作用
【发布时间】:2018-12-23 08:30:57
【问题描述】:

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

bash: type: .gitHEAD: not found

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

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

【问题讨论】:

  • 要获得更多启发,请在 bash 会话中运行 type type

标签: bash git github git-bash


【解决方案1】:

在 bash 会话中,改为尝试:

cat .git/HEAD

这应该返回类似:

ref: refs/heads/master

cattype 的类似 Unix 命令,它起源于 86-DOS 的内部命令。
git bash 会话中的默认路径不包括 system32 命令,如“type command not working as expected on Git Bash”中所述

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-01-29
    • 1970-01-01
    • 1970-01-01
    • 2023-04-11
    • 2014-08-05
    • 1970-01-01
    • 2016-09-29
    • 2020-01-21
    相关资源
    最近更新 更多