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 to suggest gcc compiler more probable branch
  • Advantages of branching in Git (for an SVN user)
  • When should i create a new branch?
  • mysterious vanishing branches in git
  • Git push: “fatal 'origin' does not appear to be a git repository - fatal Could not read from remote repository.”
  • Moving commits from one branch to another
  • 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.

  • getting rejected non fast forward issue in egit
  • Non-fast-forward error when pushing to git
  • Git: do not ignore a -directory- with a dot in it
  • Heroku:The page you were looking for doesn't exist No route matches “/”
  • git-svn password change
  • Git hook to detect file changes that contain a certain string
  • 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.