search

Home  >  Q&A  >  body text

How to force update local tag cache in git

When a tag is created remotely and then pulled to the local, and the tag is deleted remotely, the local tag still exists. How to force an update using a command

習慣沉默習慣沉默2799 days ago1634

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-05-02 09:54:19

    git fetchTry it

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-02 09:54:19

    git fetch -t -p -f

    If the remote deletes the tag, the local git push -t will still be pushed up, so it is best to delete the local tag before fetch:

    git tag -l | xargs git tag -d
    git fetch -t -p -f

    reply
    0
  • Cancelreply