Skip to content

Instantly share code, notes, and snippets.

@denield
Forked from danielestevez/gist:2044589
Created September 19, 2018 12:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save denield/f674442a68d2b5e4cf0190390e8fe832 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
This is based on https://gist.github.com/739288 thanks to nickfloyd for it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment