- On the main menu, choose Tag dialog box opens. . The
- From the Git Root drop-down list, select the required local repository.
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.
- In the Tag Name text box, type the name of the new tag.
If you specify a name that already exists, IntelliJ IDEA displays an error message. To override the error and re-assign the tag, select the Force check box.
- 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.
- 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.
If you specify a commit that does not exist, IntelliJ IDEA displays an error message.
- Create a tag.
- In the Message text box, provide a description of the commit.