gitextensions icon indicating copy to clipboard operation
gitextensions copied to clipboard

Ability to create/delete list of tags

Open andry81 opened this issue 3 years ago • 2 comments

Feature description

Ability to create/delete list of tags:

v1 v1.0 v1.0.0

Environment

  • Git Extensions 3.5.4.12724
  • Build 65f01f39982ccb121c4df7d4b00b506939553958
  • Git 2.36.1.windows.1
  • Microsoft Windows NT 6.1.7601 Service Pack 1
  • .NET Framework 4.8.4069.0
  • DPI 96dpi (no scaling)

andry81 avatar May 12 '22 01:05 andry81

What exactly are you asking for?

RussKie avatar May 12 '22 02:05 RussKie

What exactly are you asking for?

Create/delete a list of tags instead of a single tag from the context menu on a commit.

andry81 avatar May 12 '22 04:05 andry81

Additionally, would be good to "move" tags instead of manually remove + create:

Add move tags flag to convert creation of v1, v1.0, v1.0.1 tags into deletion before creation which were already exist:

  • locally delete tags: v1, v1.0
  • locally create tags: v1, v1.0, v1.0.1
  • (optional) show a window with tag changes as a list of commits in set of branches to review the changes
  • push tag changes to the remote at once

andry81 avatar Aug 22 '22 10:08 andry81

Creating multiple refs via UI isn't something this app or any other git UI I'm aware of are facilitating. Likely because this isn't something developers need to do on a day-to-day basis. I can kind of imagine a scenario where deleting of multiple tags may be required, but again this isn't something developers typically do.

In the app ref-related git operations are generally run against a specific commit, and unless all the tags that you're trying to create or delete are done on the same commit I'd struggle to imagine a UI that the app would need to provide.

What you're asking for feels very specific to your workflows, and I suggest you look into writing custom scripts that you can invoke (see under Settings > Git Extensions > Scripts)

The functionality to force push tags is available via the Push dialog: image

RussKie avatar Aug 22 '22 10:08 RussKie

What you're asking for feels very specific to your workflows

This is not a mine workflow. This is GitHub release workflow, where you have to move a tag on each release: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository

andry81 avatar Aug 22 '22 11:08 andry81

I've read the doc, and I couldn't see where it said that one needs to move tags... I'd appreciate it if you could point me to this.

We're releasing on GitHub, and the only time I needed to move a tag was when I prematurely tagged a commit.

RussKie avatar Aug 22 '22 11:08 RussKie

If click on new release, there will be a description:

Tagging suggestions

It’s common practice to prefix your version names with the letter v. Some good tag names might be v1.0.0 or v2.3.4.

If the tag isn’t meant for production use, add a pre-release version after the version name. Some good pre-release versions might be v0.2.0-alpha or v5.9-beta.3.
Semantic versioning

If you’re new to releasing software, we highly recommend reading about [semantic versioning.](http://semver.org/)

For example, in GitHub Actions composite script a common practice is to declare 3 tags: vX, vX.Y and vX.Y.Z. So if you already have v1 and v1.0 while creating v1.0.1, then you have to move v1 and v1.0.

Example:

- uses: actions/checkout@v2

andry81 avatar Aug 22 '22 12:08 andry81

Git itself only deletes tag and recreates it on another commit. A forced push of the tag is how you make the tag move in a remote. You can create a git alias command like git move--tag to do the work of making the local change. Then in a script call your alias. The only pain point with aliases is you have to configure per git config whether that be repo, global or system level.

https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases

vbjay avatar Aug 23 '22 12:08 vbjay