【发布时间】:2021-12-28 04:14:52
【问题描述】:
git clone -b (github_id) --single-branch <https://github.com/(github_id)/repository>
那么错误是
zsh: parse error near '\n'
我试过了:
- 检查我的 git 配置文件
[user]
name = (myname)
email = (myemail)
[core]
editor = code --wait
autocrlf = input
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
- 检查我的 json 文件
{
"editor.formatOnSave": true,
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single"
}
我能做什么?
【问题讨论】:
-
<和>真的存在吗? -
git clone命令中有特殊字符吗?我没用zsh,但是看到stackoverflow.com/questions/22278748/…,好像是某处的一些特殊字符给zsh带来了麻烦。 -
哦!谢谢.. 问题是
<和>。 -
尖括号 (
git clone <url>) 是一种印刷约定,意思是用适合您情况的内容替换此文本,包括尖括号。方括号 (git clone [-b <branch>] <url>) 表示 可选: 这里,-b(字面意思)和一个空格,然后是一个分支名称,它被括在尖括号中,意味着你应该想出适当的替换文本。
标签: git github parse-error