linux - Git 推送问题

标签 linux git github

我是网络开发之类的新手,我想将我的 html 和 css 文件推送到 github 但在我执行 git commitgit 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/

相关文章:

linux - 如何在 Linux 中使用 amixer 命令行实用程序设置控件属性?

git - "git push"的权限被拒绝

android - TrivialDrive 与 TrivialDrive V2?

jenkins - 在 GitHub 中,我如何授予应用程序权限以提交到具有保护的分支?

linux - bash:有意义的唯一 ID 生成

node.js - NodeJS 如何从 ubuntu 运行两个服务器文件?

Git:master/develop/feature 分支 merge 提交

git - 如何将符号链接(symbolic link)文件添加到 gitlab 仓库

git - 'fatal: LF would be replaced by CRLF'会影响源代码吗?

linux - 不允许在 bash 脚本的 getopts 中使用多个选项