Moving a tag on a remote repo

I created a tag in my local repo and pushed it to a remote one. Then I found some additional changes that belonged with that tag. So I commited the changes and moved the tag in my local repo. Now the tag is empty on the remote repo. How do I update the tag on the remote repo to point to the same commit that it does in my local repo?

  • git merge pull branches confusion
  • Git branching and switching back to master is ahead?
  • Is it safe to publish an app on Heroku that has api keys on there?
  • Why is git-cvsimport missing one major patchset?
  • git show repositories in gitweb only to some users
  • Does git track resource forks?
  • With git, temporary exclude a changed tracked file from commit in command line
  • “git push all” (multiple repositories) doesn't work
  • Aptana 3.1.1 (17th April 2012) Doesn't track changes using Git
  • How to checkout svn+ssh repository with subgit?
  • Installing GitLab and get it running on a subdomain
  • New Git branch option in Android Studio disabled
  • 2 Solutions collect form web for “Moving a tag on a remote repo”

    git push origin tag_name

    if the change of tag is non-fast-forward, add force option

    git push -f origin tag_name

    Note that git1.8.2 mentions will impose the use of the –force (-f) option:

    git push $there tag v1.2.3” used to allow replacing a tag v1.2.3 that already exists in the repository $there, if the rewritten tag you are pushing points at a commit that is a decendant of a commit that the old tag v1.2.3 points at.

    This was found to be error prone and starting with this release, any attempt to update an existing ref under refs/tags/ hierarchy will fail, without “--force“.

    Git Baby is a git and github fan, let's start git clone.