【发布时间】:2015-03-09 05:31:20
【问题描述】:
我正在尝试学习 git 并使用 mac osx 10.8
在查看我创建的存储库中的 .git/config 文件时,该文件读取,
/.git/config: line 1: [core]: command not found
/.git/config: line 2: repositoryformatversion: command not found
/.git/config: line 3: filemode: command not found
/.git/config: line 4: bare: command not found
/.git/config: line 5: logallrefupdates: command not found
/.git/config: line 6: ignorecase: command not found
/.git/config: line 7: precomposeunicode: command not found
/.git/config: line 8: [remote: command not found
/.git/config: line 9: url: command not found
/.git/config: line 10: fetch: command not found
logout
[Process completed]
什么时候,正如我的课本告诉我的,它应该说,
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://github.com/joesmith2444/my-first-repository.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
有谁知道可能是什么原因?如果需要任何其他细节,请告诉我。
【问题讨论】:
-
您确定不是不小心将它作为 bash 脚本运行吗?只是验证这是文件的实际内容。
-
.git/config是一个普通的 ini 样式文件,你不应该尝试执行它。git config是查询和/或更新此文件的命令
标签: macos git configuration-files