[英]Git remote command returns fatal: Invalid refspec +refs/heads/*:refs/remotes/:origin/*
I accidentally modified my git config file and now hitting git remote --v
in the terminal it returns: fatal: Invalid refspec '+refs/heads/*:refs/remotes/:origin/*'
, 我不小心修改了我的git配置文件,现在点击它返回的终端中的git remote --v
: fatal: Invalid refspec '+refs/heads/*:refs/remotes/:origin/*'
,
What could be wrong in my config file, this is how it looks: 我的配置文件可能有什么问题,它的外观如下:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = ssh://git@github.com/myuserame/repo.git
fetch = +refs/heads/*:refs/remotes/:origin/*
Any idea will be appreciated, Thanks. 任何想法将不胜感激,谢谢。
You can fix it with a: 您可以使用以下方法修复它:
git config remote.origin.fetch refs/heads/*:refs/remotes/origin/*
(removing the :
in :origin
) (删除:
in :origin
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.