search

Home  >  Q&A  >  body text

How to query the version number (commit id) of the current branch in git

Similar to the command in SVN: svn info -r BASE "d:/project/Coding"

I now want to know if there is a similar command in git to get the commit id

Kneel down and thank you!

迷茫迷茫2813 days ago907

reply all(6)I'll reply

  • 世界只因有你

    世界只因有你2017-05-02 09:33:28

    git rev-parse HEAD

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-02 09:33:28

    git log. You can see a lot

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:33:28

    git log --pretty=oneline

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-02 09:33:28

    You can see it in git log or git reflog

    reply
    0
  • 阿神

    阿神2017-05-02 09:33:28

    Both commands are available, as @云语2019 said:

    #git reflog 
    git log --pretty =oneline

    The results are as follows:

    69e1506ad9fed9771b9f7d1e478ac2ff05fc3604 Add git user profile functions for prompt display
    c4582777fc50162d8b433cabad34f629b0ea9b98 Merge pull request #4957 from TorrentKatten/master
    e8a9d0ee1a97033fb4aa371263889b77200b6d62 localization support for clock in candy theme
    c3b3de5f29b72b45393b62d794450ad3a72703a8 Merge pull request #4956 from RobLoach/asdf
    616ac67924212df2f75139c94ca323f13f249dc6 Add 'asdf' plugin

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-02 09:33:28

    git log --graph

    reply
    0
  • Cancelreply