gpt4 book ai didi

linux - Git 推送问题

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:49:45 24 4
gpt4 key购买 nike

我是网络开发之类的新手,我想将我的 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com