0

I have just reset --hard back by about 15 or so commits on a branch all the way back to first common parent with master, and deleted all other branches, tags etc on those 15 commits, confirming so with branch --contains.

I wanted to initially prune/delete them which led me down the paths of deleting reflogs and performing gc etc.

Issue is that git fsck doesn't list any unreachable or dangling commits, even with the --no-reflogs flag.

Any help is appreciated! I have been scouring through questions and documentation about reset, gc, fsck, reflog etc right from the man pages to similar questions.

One more thing that might be important is that I have just ran a git filter-repo on this repo which went smoothly, but has created ref and commit maps, this is the first time I'm using it so I'm not sure if the replace/ refs are still reaching those commits, although it should've have shown that with branch --contains is my guess.

Thanks again.

asgardus
  • 13
  • 3
  • `refs/original/*` will make the old commits reachable. No, they won't be printed by `git branch --contains`: branch names are refs whose full name starts with `refs/heads/` and `refs/original/refs/heads/foo` does not start with `refs/heads/`. The `git for-each-ref --contains` command would show them, though. – torek Nov 18 '20 at 04:06
  • Hi, thanks for answering, will `git for-each-ref --format='%(refname)' 'refs/'` list those references? It didn't list any `refs/original/` references when I ran it, but there were others. – asgardus Nov 23 '20 at 16:15
  • Oh, I misread `filter-repo` as `filter-branch` (which makes the `refs/original/*` names). But yes, other names in other name spaces would cause the same sorts of issues. – torek Nov 23 '20 at 17:05

0 Answers0