How to manage the version number in Git?

后端 未结 4 541
自闭症患者
自闭症患者 2020-12-23 11:33

Let\'s imagine the blerp command line tool maintained on git. This tool has the (hidden) --version option which returns its version (let\'s say 0.1.2

4条回答
  •  不思量自难忘°
    2020-12-23 12:02

    Please, have a look at git describe command. This command shows you the latest tag and an amount of commits made after the tag was set. It also possible to show the dirtiness of the repository.

    As you mentioned this command wouldn't work without the git repository (.git folder) and git installed. But it's almost unimaginable developer today without git but with all other tools installed.

提交回复
热议问题