Laravel + Angular project commit error: src refspec master does not match any

Laravel + Angular project commit error: src refspec master does not match any

有一个项目使用 angular 和 laravel 编码。我把它从服务器下载到我的本地。做一些清理后,尝试提交 git。但是每次我在 header 上指定时,我都会看到同样的错误。 经过一些测试,当我在这里寻找相同的错误时,我找不到任何解决方案。下面是我的步骤:

   1. cd sysGarden
   2. git init
   3. git add .
   4. git commit -m "first commit"
   5. git remote add origin git@github.com:biyro02/sysGarden.git
   6. git push -u origin master

在最后一步之后我看到了错误。我在 github 上有一个帐户。你可以看看:https://github.com/biyro02/sysGarden 在 git bash,我已经使用我的用户名和密码登录。一切正常,但我看到错误。请帮我。这是我的第一个 git 提交。我准备好分享我的所有信息。只是,我想超越这个问题。

编辑:我执行"git branch" 结果:* master

编辑 2:我收到以下错误:

   git@github.com: Permission denied (publickey).
   fatal: Could not read from remote repository.

   Please make sure you have the correct access rights
   and the repository exists

您应该可以通过 运行 再次执行以下命令来解决此问题。

git add .
git commit -m 'Commit Message Here'
git push -u origin master 

您也可以尝试 git push origin HEAD:master,如果您需要分享更多信息,您可以尝试 git show-ref 查看更详细的本地分支信息。

发生此问题的原因可能是文件未暂存/未跟踪,或者您当前的分支与您推送的分支不同,但我不能确定。