当我创建我的第一个项目时,我在我的机器上创建了一个 repo(比如说project1)github account,然后将它克隆到我的机器中。然后每当我机器中的代码更新时推送到它。
现在我创建了另一个项目——比如说project2在我的机器上。对其进行测试,使用git init. 我想把这个项目推送到 github。为此,我创建了repo一个github名为project2. 它现在有一个.gitignore和readme.md文件。
现在,如何将现有代码添加到此?当我 cd 到我的project2目录并尝试git push时,我收到此错误:
fatal: No destination configured to push to.
我试过git push project2
fatal: 'project2' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
请帮我纠正这个错误