git --all missing commit

后端 未结 3 1844
闹比i
闹比i 2021-01-06 17:00

Can someone please help me understand what\'s happening here?

I start with git log --oneline, which spits out:

4df9421 (HEAD, master) mo         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-06 17:27

    It is missing, because it isn't reference anymore by HEAD or by a branch.
    You have reset both (HEAD and master) to another commit, with your git reset --hard.

    Only git reflog would show you that recent commit.

    git log --all is only for listing commits referenced in refs/ (like tags, heads, ...)

    --all
    

    Pretend as if all the refs in refs/ are listed on the command line as .

提交回复
热议问题