Github 回购不显示最新提交
Github repo not showing latest commits
出于某种原因,我的 Github 存储库没有显示最新的几个提交。我像往常一样 git 添加、git 提交和 git 推送 。但是今晚它似乎没有在 repo 的提交历史记录中注册。
当我执行 git 日志时,我可以看到我最近的提交。当我执行 git 拉入新文件夹进行测试时,我的更改就在那里。当我手动提交 url 并将其放入浏览器时,我可以看到更改。 它只是没有出现在提交历史上,并且项目的总提交次数没有更新。这是为什么?
首先检查您的状态和分支:
git status
git branch
如果您没有看到以 *
开头的分支,则表示您正在 detached HEAD branch.
中工作
如果是这种情况,只需将您的 master 分支重置为当前的 HEAD 并再次推送:
git checkout -B master @
git push
虽然 OP jebmarcus confirms 在 master 分支上,但状态是干净的:
When I refreshed the repo this morning everything is working again
这一定是 GitHub 方面的一个小故障。
GitHub 上存在连接问题(8 月 3 日 "Minor service outage" -- GitHub status messages)。
我遇到了一个类似的问题,其中 github 没有在网络上显示最新的提交。
显然,我的 github 远程仓库中的所有内容都是最新的,但我只需要使用 git 推送重新输入我的凭据,以便在浏览器中查看更改。
首先确保你的 git 用户和远程仓库是正确的:
[repo-dir]$ git config user.email
your-user@email
[repo-dir]$ git remote -v
origin https://github.com/your-user-name/your-repo (fetch)
origin https://github.com/your-user-name/your-repo (push)
然后再拉再推:
[repo-dir]$ git pull origin master
From https://github.com/your-user-name/your-repo
* branch master -> FETCH_HEAD
Already up-to-date.
[repo-dir]$ git push
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/manosnoam/ansible-tempest-remote
da33d75..ae56129 master -> master
一条消息提示我输入 git username/password。
在那之后,我在 github web 中看到了我的提交更改。
当我刚接触 git 并尝试随机的东西时,我遇到了类似的问题,但即使我这样做,我的仓库也没有进行最近的更改 git reset --hard
,然后我尝试了这个。
git pull
出于某种原因,我的 Github 存储库没有显示最新的几个提交。我像往常一样 git 添加、git 提交和 git 推送 。但是今晚它似乎没有在 repo 的提交历史记录中注册。
当我执行 git 日志时,我可以看到我最近的提交。当我执行 git 拉入新文件夹进行测试时,我的更改就在那里。当我手动提交 url 并将其放入浏览器时,我可以看到更改。 它只是没有出现在提交历史上,并且项目的总提交次数没有更新。这是为什么?
首先检查您的状态和分支:
git status
git branch
如果您没有看到以 *
开头的分支,则表示您正在 detached HEAD branch.
如果是这种情况,只需将您的 master 分支重置为当前的 HEAD 并再次推送:
git checkout -B master @
git push
虽然 OP jebmarcus confirms
When I refreshed the repo this morning everything is working again
这一定是 GitHub 方面的一个小故障。
GitHub 上存在连接问题(8 月 3 日 "Minor service outage" -- GitHub status messages)。
我遇到了一个类似的问题,其中 github 没有在网络上显示最新的提交。 显然,我的 github 远程仓库中的所有内容都是最新的,但我只需要使用 git 推送重新输入我的凭据,以便在浏览器中查看更改。
首先确保你的 git 用户和远程仓库是正确的:
[repo-dir]$ git config user.email
your-user@email
[repo-dir]$ git remote -v
origin https://github.com/your-user-name/your-repo (fetch)
origin https://github.com/your-user-name/your-repo (push)
然后再拉再推:
[repo-dir]$ git pull origin master
From https://github.com/your-user-name/your-repo
* branch master -> FETCH_HEAD
Already up-to-date.
[repo-dir]$ git push
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/manosnoam/ansible-tempest-remote
da33d75..ae56129 master -> master
一条消息提示我输入 git username/password。
在那之后,我在 github web 中看到了我的提交更改。
当我刚接触 git 并尝试随机的东西时,我遇到了类似的问题,但即使我这样做,我的仓库也没有进行最近的更改 git reset --hard
,然后我尝试了这个。
git pull