How to show first commit by 'git log'?

后端 未结 6 2041
野趣味
野趣味 2020-11-30 16:50

I have a project which has long history. I want to show the first commit on git.

How do I do this?

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-30 17:53

    You can just reverse your log and just head it for the first result.

    git log --pretty=oneline --reverse | head -1
    

提交回复
热议问题