Git 提交未显示在 Github 网页上

标签 git github git-commit github-for-windows

我是使用 Github 的新手,所以我有一个问题。 我正在使用 Windows Github 客户端。我 fork 了一个存储库并添加了一些更改。 这些更改不会显示在 Github 网页上。

例如,here是我的 promise 。

Here是 repo 协议(protocol)。

但是在 GitHub 上我看到没有新的提交,最后一个来自 fork 的存储库: enter image description here

但是如果我从以下位置下载 ZIP:https://github.com/amacar/NiceHashBot然后我可以看到我之前所做的更改。 我有点困惑,不知道出了什么问题。

最佳答案

看来您的提交不是主分支的一部分,只是闲逛。尝试通过哈希直接 checkout 您的提交,为其创建一个新分支,然后将其 merge 到 master:

git checkout 7e0c8c94de9 # changes HEAD to directly this commit
git checkout -b my-change # creates a new branch for the HEAD
git checkout master
git merge my-change # merges the new branch into master
git push # pushes master to github

关于Git 提交未显示在 Github 网页上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41005278/

相关文章:

git - 说服 git blame 一个分支比另一个分支与历史更相关

git - 如何在 github 上直观地查看两个 git 提交之间的差异

git undo commit 在 protected 分支上?

git - 如何备份git服务器?

git submodule init 没有 pull 最新的提交

java - 如何在 Google App Engine 上重新部署应用程序?

git - 如何在我的本地和 github 存储库中保留一个文件的不同内容?

python-3.x - 你能通过pygithub删除一个repo吗?

git - 如何将 GitHub 项目中的子目录创建为新存储库?

commit - 删除某些内容时的语义提交类型