当前位置:   article > 正文

GitHub 上项目和跟新代码_git: 'add.' is not a git command. see 'git --help'

git: 'add.' is not a git command. see 'git --help'. the most similar command

GitHub 上传项目

问题集合

添加追踪文件

错误代码:

$ git add.
git: 'add.' is not a git command. See 'git --help'.

The most similar command is
        add

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

正确代码为:

$ git add .
  • 1

仓库为空

问题的内容是:

错误:SRC ReFSPEC主控器不匹配任何。
错误:未能将某些引用推到’git @ Github.com:HaHaa/ftpMal.git’

也就是仓库为空。

$ git push -u origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/zhuoquany/tensorflow2.git'

  • 1
  • 2
  • 3
  • 4

解决办法:

利用git add xxx.py 指令,将所有的文件全部都添加,然后再进行git commit -m "init"将所有的文件commit,

git commit -m "init"
  • 1

提示 nothing added to commit but untracked files present 检查git add . 是否执行。

然后在执行

git remote 
    声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/427934
    推荐阅读
    相关标签
      

    闽ICP备14008679号