How to manage the version number in Git?

后端 未结 4 520
自闭症患者
自闭症患者 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 11:57

    As you say, versioning issues are usually solved in git using branch and tags(like semantic versioning pattern).

    The better way is to use git to track only changes in the codebase, ignoring (using .gitignore file) builds files and maintaining a clean repository.

    Builds results (pre/compiled files, executables files, distribution files, zips, exe...) could depend of environments variables (platform, system arch, etc) and should be keep separate in a registry.

    If the codebase very big and hard to maintain, maybe you should considerate to divide it in smaller components (or git submodule) to avoid cross-dependencies at development time.

提交回复
热议问题