jenkinsci / jenkinsci/git-plugin

[JENKINS-13833] Git Publisher should allow ForceTag instead of CreateTag

Open
#2,143 2 comments 0 reactions 0 assignees View on GitHub
component:git-plugin enhancement imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

There is a common development pattern that is not currently possible with the git plugin (as far as I can tell). I want to be able to tag a recently passed commit (with an already existing tag) and push that back to the origin repository.

So the idea being that currently my git history looks like this:

40f7af3 2012-05-17 | new commit

2738f9f 2012-05-17 | previous commit (passed)

fbafd82 2012-05-17 | older commit

When 40f7af3 gets pushed and tested, if it passes it should now get the `passed` tag.

40f7af3 2012-05-17 | new commit (passed)

2738f9f 2012-05-17 | previous commit

fbafd82 2012-05-17 | older commit

If we replace CreateTag with a ForceTag checkbox, this behavior will now be possible, as will all of the previous options with createtag.

In code, all the checkbox would have to do is enable the `-f` flag while performing the git tag command. (This is already built into the API).

---
Originally reported by akoumjian, imported from: Git Publisher should allow ForceTag instead of CreateTag


  • status: Open
  • priority: Major
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 4
  • watchers: 5
  • imported: 2025-12-02

Raw content of original issue

There is a common development pattern that is not currently possible with the git plugin (as far as I can tell). I want to be able to tag a recently passed commit (with an already existing tag) and push that back to the origin repository.

So the idea being that currently my git history looks like this:

40f7af3 2012-05-17 | new commit
2738f9f 2012-05-17 | previous commit (passed)
fbafd82 2012-05-17 | older commit

When 40f7af3 gets pushed and tested, if it passes it should now get the `passed` tag.

40f7af3 2012-05-17 | new commit (passed)
2738f9f 2012-05-17 | previous commit
fbafd82 2012-05-17 | older commit

If we replace CreateTag with a ForceTag checkbox, this behavior will now be possible, as will all of the previous options with createtag.

In code, all the checkbox would have to do is enable the `-f` flag while performing the git tag command. (This is already built into the API).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.