← Winnitude! Search  ·  Reader Mode (961 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 14 LINKS

Add lightweight tag to specific annotated tag use GitPython API · gitpython-developers/GitPython · Discussion #1942

Repository navigation

Add lightweight tag to specific annotated tag use GitPython API #1942

Unanswered AlesyaSeliazniova30032012 asked this question in Q&A Add lightweight tag to specific annotated tag use GitPython API #1942 AlesyaSeliazniova30032012 Jul 10, 2024 · 1 comment Return to top Discussion options

AlesyaSeliazniova30032012 Jul 10, 2024

I still have a question. I need to add a lightweight tag to the annotated tag using the Git python API.
repo.create_tag () adds an annotated tag, not lightweight.
do something like:

repo.git.checkout(annotated_tag)
repo.git.tag(new_lightweight_tag)
repo.remotes.origin.push(new_lightweight_tag)

causes Aborting... when executing git checkout if some local changes are not saved
Is there any other way to use the Git Python API to create lightweight tag to specific annotated tag?

found similar question without answer https://stackoverflow.com/questions/58628666/gitpython-creating-a-lightweight-tag
Thanks

1 You must be logged in to vote

Replies: 1 comment

Comment options

Byron Jul 11, 2024
Maintainer

I dumped all the text into chatGPT, but think it's answer might not quite be on point.

1 You must be logged in to vote 0 replies Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment Category Q&A Labels None yet 2 participants