I have a project in a git repository with the code of an application ( App1 onwards).
I have been asked to create a second very similar application. In fact, it's almost a second instance of App1, so I've done the obvious: create a fork of the repository and start modifying what's going to be different. So far no problems.
What I don't know how to solve is the tag issue: every time I deploy a new version, using semver , I create a tag: v1.0.0, v1.1.0, v2.0.0...etc. The problem is that in the new project I wanted to name the first production deployment App2 v1.0.0, but the tag v1.0.0 (and a couple of dozen others) is already used.
Can I easily delete all the tags on my fork? Can it have any unexpected consequences?
If you're using Linux, you can use this line:
It works like this:
git tag -l '*'
: List all tagsgit tag -d $tag
: Delete the tag locallygit push origin :$tag
: Delete the tag on the remote (Uploading an empty reference)As for the second question, I can't think of unexpected consequences. Perhaps there are references in the commits or in the code referring to the tags.
Another option is to rename the current tags to "App1-TAG" and keep history consistent. I think it could be done like this:
In my opinion, it is a good idea to keep the history of App1 in the new repo (as recommended by @ordago), and from the fork continue with the independent development, deleting the branches outside the master and the tags.