How to transform an old branch into a tag on GitHub
My first actually serious project on GitHub has some time ago underwent a complete change of stack – from Python to NodeJS. However, at the time being a complete git noob I created a branch with all the Python code and then deleted everything on the master branch and started implementing the system in NodeJS.
Now I’m still a git noob but I realised I should have used a tag instead of a branch. So I have this
old_python branch hanging there and it annoys me.
How can I get rid of that branch but still be able to quickly have a look at the Python code which would be a tag? I dont plan on commiting anything to the Python codebase so the branch seems unnecessary.
Or, perhaps, I am completely misunderstanding what tags are for and should leave it/do something else.
One Solution collect form web for “How to transform an old branch into a tag on GitHub”
Create the tag
git tag <tagname> origin/old_python
Delete the branch (if you have a local branch)
git branch -d old_python
Push the tag
git push --tags origin
Delete the remote branch
git push origin :old_python