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.
- 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, PhpStorm 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, PhpStorm displays an error message.
- Create a tag.
- In the Message text box, provide a description of the commit.
- Committing Changes to a Local Git Repository
- Pulling Changes from the Upstream (Git Pull)
- Pushing Changes to the Upstream (Git Push)
- Version Control with PhpStorm