PyCharm 3.1.0 Web Help

The Git integration supports tagging a particular commit or object to refer to it in the future. Basically, by adding a tag you create a branch that never moves.

You can also create annotated tags and have annotations displayed to facilitate viewing and navigating through tagged commits.

To assign a tag to a commit
  1. On the main menu, choose VCS | Git | Tag Files. The Tag dialog box opens.
  2. From the Git Root drop-down list, select the required local repository.

    Note

    The Current Branch read-only field shows the branch you are currently working with in the selected repository. The contents of the read-only field change as you change the selection in the Git Root drop-down list.

  3. In the Tag Name text box, type the name of the new tag.

    Tip

    If you specify a name that already exists, PyCharm displays an error message. To override the error and re-assign the tag, select the Force check box.

  4. In the Commit text box, specify the commit or object which you want to tag:
    • To tag the latest commit in the branch (HEAD), leave the text box empty.
    • To tag a particular commit, specify its commit hash or use an expression, for example, of the following structure: <branch>~<number of commits backwards between the latest commit (HEAD) and the required commit>.

      Refer to the Git commit naming conventions for details.

  5. To check that the specified commit exists and is the one you actually need, click the Validate button. The Paths affected in commit dialog box shows the files that were affected in the specified commit. View the information and click OK.

    Note

    If you specify a commit that does not exist, PyCharm displays an error message.

To create an annotated tag
  1. Create a tag.
  2. In the Message text box, provide a description of the commit.

See Also

Concepts:

Procedures:

Reference:

Web Resources: