Skip to content

Instantly share code, notes, and snippets.

@danielestevez
Last active November 6, 2025 20:14
Show Gist options
  • Select an option

  • Save danielestevez/2044589 to your computer and use it in GitHub Desktop.

Select an option

Save danielestevez/2044589 to your computer and use it in GitHub Desktop.
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
3) Delete and recreate the tag locally
git tag -d {tagname}
git tag {tagname}
4) Delete and recreate the tag remotely
git push origin :{tagname} // deletes original remote tag
git push origin {tagname} // creates new remote tag
5) Update local repository with the updated tag (suggestion by @wyattis)
git fetch --tags
This is based on https://gist.github.com/739288 thanks to nickfloyd for it
@ba11b0y

ba11b0y commented Jul 20, 2020

Copy link
Copy Markdown

THANKS A TON!!!

@joivo

joivo commented Jul 29, 2020

Copy link
Copy Markdown

nice!

@arashzjahangiri

Copy link
Copy Markdown

Awesome!

@benjaminudoh10

Copy link
Copy Markdown

Very nice!

@lemmy04

lemmy04 commented Oct 7, 2020

Copy link
Copy Markdown

👍

@Roralee

Roralee commented Nov 17, 2020

Copy link
Copy Markdown

This is such good stuff! Thank you for documenting and being so clear about it, too. So many instructions are written such that I have cudgel my brain to figure out what's going on. Kudos.

@kencieszykowski

Copy link
Copy Markdown

YES. Thank you for the quick, foolproof post here. A+++ quality content.

@A-D-E-A

A-D-E-A commented Mar 10, 2021

Copy link
Copy Markdown

Thanks!

@safweb89

Copy link
Copy Markdown

cool

@i-vyshnevska

Copy link
Copy Markdown

thanks 👍

@righdforsa

Copy link
Copy Markdown

🎉 Big help, thanks.

@reemuru

reemuru commented Jul 27, 2021

Copy link
Copy Markdown

dope 🔥

@maxcotec

maxcotec commented Sep 6, 2021

Copy link
Copy Markdown

Amazoning!

@Thomas-Ripoll

Copy link
Copy Markdown

Very usefull for minor fixes! thx

@dkkahn10

Copy link
Copy Markdown

Many thanks!

@xujq1

xujq1 commented Nov 21, 2021

Copy link
Copy Markdown

It is very helpful , thanks a lot

@Mreyna3

Mreyna3 commented Nov 22, 2021

Copy link
Copy Markdown

5 years later, Saved me a couple hours

@willinivelics

Copy link
Copy Markdown

Thanks so much!!

@abbathaw

abbathaw commented Jan 6, 2022

Copy link
Copy Markdown

Thanks

@geerlingguy

Copy link
Copy Markdown

Saved me a few hours futzing around trying to update a dozen or so tags. Feels totally wrong and against the idea of tag in the first place, but sometimes tags just don't work the exact way a project requires!

@uncannyMBM

Copy link
Copy Markdown

Thanks a lot.

@lissy93

lissy93 commented May 21, 2022

Copy link
Copy Markdown

Felt a bit wrong deleting my tag remotely, but worked out perfectly. Thanks very much!
Side note, everywhere I go on the internet, I seem to see traces of @geerlingguy pop up! 🤣

@chairwa

chairwa commented May 28, 2022

Copy link
Copy Markdown

Thanks.

@hotstar-xia

Copy link
Copy Markdown

Thanks!!

@rproenza86

Copy link
Copy Markdown

It is still relevant. Thanks!!!

@robertmin1

Copy link
Copy Markdown

Thanks

@AZPedro

AZPedro commented Feb 14, 2023

Copy link
Copy Markdown

Thanks!

@zomars

zomars commented Mar 20, 2023

Copy link
Copy Markdown

Noice

@lmurugesan-px

Copy link
Copy Markdown

Thanks a lot

@mahedi-anik-asl

Copy link
Copy Markdown

It is still relevant. Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment