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.

  • Managing branches in subversion
  • git checkout remote branch shows extraneous files?
  • Does git change submodule reference when switching branch
  • Git: “Not currently on any branch.” Is there an easy way to get back on a branch, while keeping the changes?
  • Split a git branch into two branches?
  • remote branching after the fact
  • 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.

  • git cannot clone or push? failed to connect, connection refused
  • Possibility for git “overlays” (storing only differences to extern repositories in a local repository)?
  • Git Server Like GitHub?
  • git push heroku master fails because key is not authorized
  • Checkout/List remote branches in git-python
  • What should I know about Git before I start using it?
  • 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
    Git Baby is a git and github fan, let's start git clone.