0

I have a repository that still testing. And I made a lot of squash and git push --force -u origin master.

There were some commits, I made that for closing issues, and I squashed some of that.

Now, I found a problem with github.

In the github issues page, I can still found some commit hash that no longer show in repository commit log, and can not access by git rebase -i xxxx, the command will return fatal: invalid upstream 'xxxx'.

But I can still access this kind of commits in the github issue log by the commit hash in the issue pages.

Is there any way to remove this kind of commit logs in github issue logs?

Joshua Lee
  • 121
  • 1
  • 9
  • Did you read e.g. https://github.community/t/does-github-ever-purge-commits-or-files-that-were-visible-at-some-time/1944? – jonrsharpe Jun 03 '20 at 14:00
  • @jonrsharpe I did serached. But this page does not fit my keywords. I tried `git gc`, but not ting changed. Thanks by the way. – Joshua Lee Jun 03 '20 at 14:25
  • `git gc` only runs locally, you're not running that command *on GitHub*. What actual *problem* is this causing? – jonrsharpe Jun 03 '20 at 14:26
  • https://stackoverflow.com/a/32840254/7976758 – phd Jun 03 '20 at 14:28
  • But `git push --force -u origin master` can overwrite the repository in github, right? Or I just got misunderstanding about this? – Joshua Lee Jun 03 '20 at 14:29
  • Fortunately, my problem was not about sensitive data. I think I can wait the [next periodically garbage collect](https://stackoverflow.com/a/4368673/4025592) by github. Thanks @phd. – Joshua Lee Jun 03 '20 at 14:51
  • "*overwrite the repository in github, right?*" Nop. It can overwrite some references — `master` branch in your example. But the old commits do not disappear from the repo. Only `git gc` can remove old unreferenced commits. – phd Jun 03 '20 at 15:43

0 Answers0