无法在github上推动存储库

发布于 2025-02-13 15:53:27 字数 374 浏览 2 评论 0原文

我试图将本地GIT存储库推向GitHub,但没有成功。

到目前为止,我遵循的步骤是:

  • 使用git Init。
  • git add。
  • 使用提交-m“一些文本”
  • 在GitHub上创建新存储库
  • ,通过git远程添加添加https://github.com/myusername/myreponame
  • 使用git push -U Origin main进行推动,

这是我应该能够在浏览器中看到文件的地方。但是,当我在Github上刷新我的存储库页面时,什么都没有改变。

I try to push my local git repository to github with no success.

The steps I followed so far are:

  • Create the repository in git with git init .
  • Add a file to the staging area using git add .
  • Make a commit using git commit -m "some text"
  • Create new repository on github
  • Establish connection with github via git remote add origin https://github.com/myusername/myreponame
  • Make a push with git push -u origin main

At this point is where I should be able to see my files in the browser. But when I refresh my repository page on github, nothing has changed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼眸里的那抹悲凉 2025-02-20 15:53:27

您需要运行git push origans master以推动github远程存储库中的更改,因为您在Master您本地的分支

You need to run git push origin master to push the changes in your github remote repo Cause You're on master branch in your local

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文