微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 github 上看不到推送的分支

如何解决在 github 上看不到推送的分支

我已经对一个分支进行了一些更改,提交并推送了它,但我仍然没有在 github 上看到该分支(也没有提交)(或者无法将更改拉到另一台机器上)。 我已经尝试过的:

$ git branch       *MyBranch
                   main
$ git push         Everything up-to-date
$ git branch -vv   *MyBranch 76e9e79[origin/MyBranch] last commit message
$ git status       On branch MyBranch
                   Your branch is up to date with 'origin/MyBranch'.
$ git remote show origin MyBranch    tracked
      Local branches configured for 'git pull':
      MyBranch merges with remote MyBranch
      main                     merges with remote main
    Local refs configured for 'git push':
      MyBranch pushes to MyBranch (up to date)
      main     pushes to main                     (up to date)

这是怎么回事,为什么 MyBranch 在 github 上不可见,也不能在另一个系统上拉取?

回应@ElpieKay 的评论

$ git remote -vv
origin  git@github.com:org/repo.git (fetch)
origin  git@github.com:org/repo.git (push)

git push origin MyBranch:MyBranch
Everything up-to-date

解决方法

我将从头开始,获取一个新的克隆并复制我更改过的文件......幸运的是,更改的大小是可以管理的。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。