{"thread":{"id":"53823","subject":"Tagging from within a worktree causes fatal: tag already exists","startedAt":"2020-07-09T11:21:00Z","lastAt":"2020-07-09T11:21:00Z","messageCount":1,"participants":["Sivanandan Srilakshmanan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"401238","messageId":"CACKP9csQxeWeKjEB8RPa=hdMpOAFtXt3_WErxk8cdR1soNu+Fw@mail.gmail.com","threadId":"53823","inReplyTo":null,"subject":"Tagging from within a worktree causes fatal: tag already exists","fromName":"Sivanandan Srilakshmanan","fromEmail":"ssrilaks@gmail.com","sentAt":"2020-07-09T11:20:47Z","receivedAt":"2020-07-09T11:21:00Z","isPatch":false,"sender":{"key":"ssrilaks@gmail.com","avatar":null},"body":"Hi,\n\nI have been using git and worktree for about 8 months and getting my\nteam upto speed, with absolute success. Thanks for your help during my\ninitial stages.\n\nI am in the production readiness phase and wanted to merge the branch\ninto master, tag and deploy into UAT.\n\nWhen I run \"git tag -l\" on any worktree, they all list the tag created\nin proj1 (1.0.0-1).\nBut when I run \"git show 1.0.0-1\" it is associated only with proj1\n(see listing below)\nThe issue is, I am unable to create a tag 1.0.0-1 in any other worktree.\n\nIn summary, I performed the following steps.  proj1 & proj2 are two\ndifferent git repositories.\n1. Checked out master (proj1) into a local-directory-proj1-master using worktree\n2. Merged the dev-branch into master\n3. Pushed the change to central server\n4. From the local-directory-proj1-master, I created a tag (1.0.0-1)\n5. pushed the tag  to central server\n\n6.  Checked out master (proj2) into a local-directory-proj2-master\nusing worktree\n     Performed steps 2 & 3 above for proj 2\n\n7.  From the local-directory-master (proj2) , I created a tag (1.0.0-1)\n     fatal: tag '1.0.0-1' already exists\n\nYour assistance is greatly appreciated.\n\nThanks\nLakshman\n\n\n\nPlease find detail steps below\n\nproj1 => remote (origin)\nLocal_proj1-DEV => Development Branch\nproj1/master    => Remote Tracking branch\n\ngit worktree add --checkout c:\\source\\proj1-master -b\nLocal-proj1-master proj1/master\n\ncd c:\\source\\proj1-master\n\nC:\\Source\\proj1-master>git merge Local_proj1-DEV\n\nC:\\Source\\proj1-master>git push proj1 HEAD:master\n\nC:\\Source\\proj1-master>git tag -a -m \"Initial release candidate\" 1.0.0-1\n\nC:\\Source\\proj1-master>git show 1.0.0-1\ntag 1.0.0-1\nTagger: Lakshman <sadsd>\nDate:   Thu Jul 9 17:38:23 2020 +1000\n\nInitial release candidate\n\ncommit 99fe92 (HEAD -> Local-proj1-master, tag: 1.0.0-1, proj1/master,\nproj1/dev, Local_proj1-DEV)\n\ngit push proj1 1.0.0-1\n\n\n\n\ncd c:\\source\\proj2-master\n\nC:\\Source\\proj2-master>git tag 1.0.0-1\nfatal: tag '1.0.0-1' already exists\n\nc:\\source\\proj2-master>git show 1.0.0-1\ntag 1.0.0-1\nTagger: Lakshman <sadsd>\nDate:   Thu Jul 9 17:38:23 2020 +1000\n\nInitial release candidate\n\ncommit 99fe92 (tag: 1.0.0-1, proj1/master, proj1/dev, Local_proj1-DEV,\nLocal-proj1-master)\n"}]}