Can "anvil-preserved" tags be deleted?

I don’t like to delete tags created by Anvil, because there must be a reason why Anvil created them, and I don’t want to risk to break anything.

But I also don’t like to work in a messy place, and this is getting really messy.

What are those tags for?

Can I delete them without the risk of breaking anything?

(Also, if I really need to work in a messy place, I would like for that mess to be in alphabetical order :slight_smile:, sorry, I had to slide that in, sorry)

1 Like

The answer is yes, the anvil-preserved/* tags can be deleted (Anvil support confirmed via email).

Another good news is that the UI doesn’t show those tags any longer. Other tags, the ones you explicitly create, are visible, only the anvil-preserved/* have been removed.

At this point this is an issue only if you clone the repository to your computer and you are really bothered by those tags. If that is the case you can delete them from the remote repository with git push --delete origin anvil-preserved/123.

Here is how to delete the tags you don’t want from the remote repository, how to delete all tags (including the ones defined only locally!) from the local and how to fetch the remote tags. This is in PowerShell because that’s the default terminal in PyCharm on Windows.

# delete the tags from the remote repository
git push --delete origin anvil-preserved/1
git push --delete origin anvil-preserved/2
git push --delete origin anvil-preserved/3

# delete all the tags from the local repository
git tag -l | ForEach-Object { git tag -d $_ }

# fetch the remote tags
git fetch --tags   
1 Like

origin ! I had forgotten that we could give orders to our Anvil-side repositories! This has a lot of potential for automating what are now tedious, carefully-coordinated manual steps in the IDE.

1 Like

Did you really think I knew how to do that loop in PowerShell??

Thanks ChatGPT!

(I tested it with a new dummy app first, because yeah, thank you ChatGPT, but I also don’t trust you blindly!)