git clone 出现错误 zsh: parse error close ' '

问题描述 投票:0回答:1

git clone -b (github_id) --single-branch <https://github.com/(github_id)/repository>

那么错误是

zsh: parse error near '\n'

我试过:

  1. 检查我的 git 配置文件
[user]
    name = (myname)
    email = (myemail)

[core]
    editor = code --wait
    autocrlf = input
[diff]
    tool = vscode
[difftool "vscode"]
    cmd = code --wait --diff $LOCAL $REMOTE
  1. 检查我的 json 文件
{
    "editor.formatOnSave": true,
    "javascript.preferences.quoteStyle": "single",
    "typescript.preferences.quoteStyle": "single"
}

我能做什么?

git github parse-error
1个回答
0
投票

正如在这里看到的,使用

git clone <url>
会触发您看到的错误消息。
相反,这会起作用,without
<>

git clone -b github_id --single-branch https://github.com/github_id/repository
© www.soinside.com 2019 - 2024. All rights reserved.