软件是对质量的不懈追求

Git: Branch from a tag

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 on 2010-01-08 08:37 BlakeSu 阅读(1096) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: