How do I show the SVN revision number in git log?

前端 未结 4 385
抹茶落季
抹茶落季 2020-12-24 11:56

I\'m customizing my git log to be all in 1 line. Specifically, I added the following alias:

lg = log --graph --pretty=format:\'%Cred%h%Creset - %C(yellow)%an         


        
4条回答
  •  我在风中等你
    2020-12-24 12:27

    Run:

    git rev-parse HEAD
    

    which gives you git commit hash.

    Then use that commit hash to run:

    git svn find-rev 
    

    Which gives you svn revision.

提交回复
热议问题