In Git, how do you see and manage commits that aren't in a branch?

前端 未结 3 890
长发绾君心
长发绾君心 2021-01-22 17:39

A commit isn\'t necessarily in a branch, so how do you see and manage these commits? Also, is it possible to look at these commits from gitk?

Thanks a lot!

PS: j

3条回答
  •  礼貌的吻别
    2021-01-22 18:19

    git reflog will show you a symbolic name like HEAD@{0} that you can use to access that otherwise unreachable commit. You could then use gitk --all HEAD@{0} to see where it exists in your repository.

提交回复
热议问题