* Tagging from within a worktree causes fatal: tag already exists
@ 2020-07-09 11:20 Sivanandan Srilakshmanan
0 siblings, 0 replies; only message in thread
From: Sivanandan Srilakshmanan @ 2020-07-09 11:20 UTC (permalink / raw)
To: git
Hi,
I have been using git and worktree for about 8 months and getting my
team upto speed, with absolute success. Thanks for your help during my
initial stages.
I am in the production readiness phase and wanted to merge the branch
into master, tag and deploy into UAT.
When I run "git tag -l" on any worktree, they all list the tag created
in proj1 (1.0.0-1).
But when I run "git show 1.0.0-1" it is associated only with proj1
(see listing below)
The issue is, I am unable to create a tag 1.0.0-1 in any other worktree.
In summary, I performed the following steps. proj1 & proj2 are two
different git repositories.
1. Checked out master (proj1) into a local-directory-proj1-master using worktree
2. Merged the dev-branch into master
3. Pushed the change to central server
4. From the local-directory-proj1-master, I created a tag (1.0.0-1)
5. pushed the tag to central server
6. Checked out master (proj2) into a local-directory-proj2-master
using worktree
Performed steps 2 & 3 above for proj 2
7. From the local-directory-master (proj2) , I created a tag (1.0.0-1)
fatal: tag '1.0.0-1' already exists
Your assistance is greatly appreciated.
Thanks
Lakshman
Please find detail steps below
proj1 => remote (origin)
Local_proj1-DEV => Development Branch
proj1/master => Remote Tracking branch
git worktree add --checkout c:\source\proj1-master -b
Local-proj1-master proj1/master
cd c:\source\proj1-master
C:\Source\proj1-master>git merge Local_proj1-DEV
C:\Source\proj1-master>git push proj1 HEAD:master
C:\Source\proj1-master>git tag -a -m "Initial release candidate" 1.0.0-1
C:\Source\proj1-master>git show 1.0.0-1
tag 1.0.0-1
Tagger: Lakshman <sadsd>
Date: Thu Jul 9 17:38:23 2020 +1000
Initial release candidate
commit 99fe92 (HEAD -> Local-proj1-master, tag: 1.0.0-1, proj1/master,
proj1/dev, Local_proj1-DEV)
git push proj1 1.0.0-1
cd c:\source\proj2-master
C:\Source\proj2-master>git tag 1.0.0-1
fatal: tag '1.0.0-1' already exists
c:\source\proj2-master>git show 1.0.0-1
tag 1.0.0-1
Tagger: Lakshman <sadsd>
Date: Thu Jul 9 17:38:23 2020 +1000
Initial release candidate
commit 99fe92 (tag: 1.0.0-1, proj1/master, proj1/dev, Local_proj1-DEV,
Local-proj1-master)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-09 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 11:20 Tagging from within a worktree causes fatal: tag already exists Sivanandan Srilakshmanan
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).