我是网络开发之类的新手,我想将我的 html 和 css 文件推送到 github 但在我执行 git commit
和 git push origin master
之后我得到了这个错误:
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
如果这是一个愚蠢的问题,我很抱歉,但我是新手,我无法在网上找到答案。我查看了几个教程,但没有成功将我的页面推送到 GitHub。我已经使用本教程更新了我的 README.md
文件:http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository
最佳答案
来自GitHub documentation ,您需要配置您的 origin
以指向 GitHub 远程:
git remote add origin https://github.com/user/repo.git
# Set a new remote
git remote -v
# Verify new remote
将 https://github.com/user/repo.git
替换为您在 GitHub 上的远程存储库的实际路径。
关于linux - Git 推送问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32982430/