存储库提交计数错误 [英] Repository commit count wrong

查看:56
本文介绍了存储库提交计数错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

回购:

解决方案

如果重新设置基础然后强制执行推送,则需要尝试恢复以前的主HEAD,该主HEAD被新的(或更短的)历史记录所覆盖.

检查 git reflog :您应该看到自己的重新提交之前的旧提交.
或参阅" github是否记得提交ID?":您可以查询push事件以这种方式获取旧的提交.

在这两种情况下,您至少可以基于该提交创建一个分支(您的PC上的本地分支,或直接通过GitHub Web界面的远程分支),以查看是否可以恢复历史.br>该号码仍将关闭,但是至少您丢失的提交将在那里,并且您可以根据需要再次尝试挑选/订购它们.

Repo: sumitridhal/n-th-digit-of-e

Count shown in github profile and commit count in repository not matching. Due to this some of latest commits are missing from repository. Is there any way i can retrieve all my commits?

解决方案

If you rebase and then force push, you need to try and restore the previous master HEAD which was overwritten by the new (and shorter) history.

Check git reflog: you should see your old commit before rebase.
Or See "Does github remember commit IDs?": you can query the push events to get back an old commit that way.

In both instances, you can at least create a branch based on that commit (either local branch on your PC, or a remote branch directly through the GitHub web interface), in order to see if you get back your history.
The number will still be off, but at least your missing commits will be there, and you can try again to cherry-pick/order them as you want.

这篇关于存储库提交计数错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆