九游平台/ 代码托管 codearts repo/ 常见问题/ 代码上传下载问题/ 执行git push 命令时,报错'origin' does not appear to be a git repository...
更新时间:2024-09-09 gmt 08:00

执行git push 命令时,报错'origin' does not appear to be a git repository...-九游平台

问题现象

执行如下命令时,出现报错“'origin' does not appear to be a git repository...”

git push --set-upstream origin feature1 

原因分析

原因是远程不存在origin这个仓库名称。

处理方法

查看远程仓库名称及路径的相关信息,删除错误的远程仓库名称,再重新添加新的远程仓库。执行如下命令:

  1. 查看远程仓库的详细信息,可看到代码仓库的名称,关联地址。
    git remote -v
  2. 删除错误的origin仓库。
    git remote remove origin
  3. 重新添加远程代码仓库地址。
    git remote add origin
  4. 重新提交代码文件到远程代码仓库的master主干。
    git push -u origin master

相关文档

网站地图