I noticed that after doing some git actions some commits are lost, as expected, but are still visible on github with the error: This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To reproduce what I did:
- repository is now:
A -> B -> C
- soft reset to commit
A
- redo commits
B
andC
asB(mod)
andC(mod)
- repository is now:
A -> B(mod) -> C(mod)
- force push to github
- now commit
B
andC
can't be seen in rep history but are visible on github with above specified error
(example link where I can see it: https://github.com/user/rep/commit/B ;
while https://github.com/user/rep/commit/B(mod) appears with the expected modification)
- what could be causing this?
- does the rep contains the commits
B
andC
or not? if yes, how can I delete them/clean the rep?
thanks