Skip to content

Instantly share code, notes, and snippets.

@rfennell
Created July 8, 2021 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rfennell/43ff131f443bd2912b4f150e64337692 to your computer and use it in GitHub Desktop.
Save rfennell/43ff131f443bd2912b4f150e64337692 to your computer and use it in GitHub Desktop.
Move a Git tag to the most recent commit
param
(
$tagname,
$trunk = 'main'
)
& git push origin :refs/tags/$tagname
& git tag -fa $tagname -m "Current $tagname release"
& git push origin $trunk --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment