git - 无法将代码推送到 Github

标签 git github

尝试运行“git Push”时不断收到此错误:

fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using

    git remote add <name> <url>

and then push using the remote name

    git push <name>

我已经完成了这个过程,但后来我得到了另一个错误:

fatal: 'angrails-front' 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.

不知道现在该做什么...

最佳答案

首先尝试克隆存储库:如果成功,将来的提取也会成功。
之后修改文件,添加、提交、推送

cd /a/path
git clone https://github.com/Roeck/angrails-front
cd angrails-front
# modify a file
git add .
git commit -m "new commit"
git push

关于git - 无法将代码推送到 Github,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50958919/

相关文章:

git - checkout 到另一个分支时,文件被删除为未暂存的更改

git push 与 git-cola 失败

github - 如何在 npm 中为 package.json 依赖项使用(环境)变量?

Git - 重置本地更改

git - 网比/ git ;在分支之间复制单个文件

git - 如何将 git 分支变成 fork?

git push tag only 和 commit 区别

ruby-on-rails - Heroku、Rails 和 ActiveUUID——Heroku 使用旧的迁移文件?

git - 这个分支是从哪个 git 分支 checkout 的?

Git,Github - origin/main 与 origin/master