最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

`git log` shows commits not upstream any branch or tag - Stack Overflow

programmeradmin5浏览0评论

I often watch git log --all --oneline --graph --decorate --colors to keep an eye on my rebases. Today, something rather unsettling is showing up:

* b782b84 (HEAD -> dev, origin/dev) III
* 22fe431 HHH
* 3d39dc4 GGG
* 734bfd5 FFF
* f003c5a (feedback, origin/feedback) EEE'
| * 4b111a4 HHH
| * ca0b9da GGG
| * 4654daa FFF
|/
| * 84a209b EEE
|/
* 77131a3 (origin/main, main) DDD
* 6cbe8f3 CCC
* 442b907 BBB
* 93ac810 AAA

All commits from 84a209b to 4b111a4 are visible in the output, although they have been rebased and the branches moved to b782b84 (dev) III (formerly on 4b111a4 HHH) and f003c5a (feedback) EEE' (formerly on 84a209b EEE).

FWIU, these spurious commits are not accessible from any branch or tag anymore, so they should be elided from this output, right?

What could be happening? Why would these commits still show up? How can I investigate?

The behaviour is robust to git checkout here and there and to git gc. Everything behaves as if some phantom branch/tag was still pointing to 4b111a4 and 84a209b.

发布评论

评论列表(0)

  1. 暂无评论