错误:未能将一些引用推送到“原点”

问题描述

此命令 git push -u origin master 输出以下错误

error: Failed to push some refs to 'origin'

error: src refspec master does not match any

我也试过这个:

git add .
git commit -am "initial commit"
git push -u origin master

然后输出

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

解决方法

你没有出身。运行 git remote 以证明 [ref]。

使用 git remote add origin <path to remote repository> 添加新源。