• Home
  • About

stonean

Feeds:
Posts
Comments

Git: Branch from a tag

February 17, 2009 by stonean

In git, you can’t update a tag directly, but you can branch the code to create a new tag. Here’s how you would do that:

First, you need to checkout the tag:

git checkout <tag_name> 

Then create a branch:

git branch -b <branch_name>

After you make your changes, commit them (there are a few ways to do this, keeping it simple):

git commit -am 'my descriptive comment on this commit'

You can create a new tag:

git tag <new_tag_name>

Then you can push the tag:

git push --tags

Posted in git | No Comments Yet

  • Open Source


    Lockdown (GitHub)
    RuHL (GitHub)

  • Recommend Me

  • twitter: stonean

    • So I submitted my RailsConf proposal, called it Beyond MVC. We shall see. I do such a bad job talking about myself, the bio sucked. 7 hours ago
    • @ubermuda that's good to know, thank you! 1 day ago
    • @chanmix51 cool, thanks! 1 day ago
    • In vi, :set list to show hidden characters, to revert, :set nolist Very handy. 1 day ago
    • Team just did their first PechaKucha [ http://vurl.me/EEP ] session. I love this format and am very impressed with results! 2 days ago
  • Categories

    classy-inheritance Code Style DataMapper Fusion git Haml Interview Questions jQuery lockdown Merb MysqlUtils Process Quick Tips REST RSpec Ruby RubyOnRails rubytrends Stage thoughts Uncategorized


  • Archives

    • November 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007

Blog at WordPress.com.

Theme: Mistylook by Sadish.