Search code examples
gitvisual-studio-2019visual-sourcesafe-2005

Does GIT have an equivalent of Visual Sourcesafe's (project label)?


VSS has a feature that allows one to create a (label) for an entire project or an entire solution. The VSS (label) is typically the assembly or file version - example (1.0.0.1)

By creating a (label) in VSS I am able to view the label history and retrieve or get back to the exact same code base, and all of the code files, that were used to create a particular EXE.

My question is does GIT have a similar feature? If so, how does one create a (project label) using GIT?


Solution

  • I think what you're looking for is git tag. Check out the official documentation.

    Basically, with git tag you are able to specify a point in your history that signifies a "release" with a version of your software. For that tag of your source code you can create your corresponding .exe or whatever else you have.

    There are two types of tags(labels) in git - lightweight and annotated.

    A simple way to create a tag for your major release is

    # annotated
    git tag -a 1.0.6.0 -m "release 1.0.6.0"
    
    # lightweight 
    git tag v1.5.6
    

    Annotated tags store more information and cannot be moved (but can be deleted). You can have many such tags indicating your multiple versions, while lightweight tags are like a branch, just a pointer to some state.