Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Unanswered
AlesyaSeliazniova30032012 asked this question in Q&A
Discussion options

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

You must be logged in to vote

Replies: 1 comment

Comment options

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

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.