Reputation: 902
I am trying to Create a Tag Commit in Git via VSCode. VS code's built in Git has a commit option. But How to create a Tag Commit via VS Code
Upvotes: 44
Views: 46783
Reputation: 9
If you have the 'Git Graph' extension loaded in VSCode, click on Git Graph (on the bottom bar of the VSCode window) to open the list of commits. Image showing Git Graph is located at the bottom of the VSCode window
The graph displays a list of all commits for the project.
Right-click the commit you want to tag, select "Add tag" from the popup menu, then enter the tag details as required. You also have the option to push the tag: Image showing the tag details input options
Upvotes: 0
Reputation: 1324023
In addition of Git: Create Tag
, you now have Git: Push Tag
with VSCode 1.52 (Nov. 2020) and PR 110096, which fixes issue 109799.
Git: Create Tag
is git tag -m '...' aTag
to create locally an annotated tag,Git: Push Tag
is git push --tags
, to publish local tags to the remote repository.Even more automatic: the new setting git.followTagsWhenSync
: Follow tags when running Git: Sync.
Upvotes: 13
Reputation: 8063
You can open the Command Palette (Ctrl + Shift + P
) and choose Git: Create Tag
.
Give the tag a name and press Enter
.
To push the tag to the remote server, you can open the Command Palette again and choose Git: Push (Follow Tags)
.
(It seems this is the PR that included the feature: https://github.com/Microsoft/vscode/pull/26999)
Upvotes: 54
Reputation: 23434
Open the command line in the git repo and type "git tag mytag".
There is currently no way to add a tag inside of the VS Code test editor.
Upvotes: 8