Skip to content

Instantly share code, notes, and snippets.

@nickfloyd
Created January 27, 2011 05:38
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 20 You must be signed in to fork a gist
  • Save nickfloyd/798119 to your computer and use it in GitHub Desktop.
Save nickfloyd/798119 to your computer and use it in GitHub Desktop.
To create a branch from a tag
-Go to the starting point of the project
>> git checkout origin master
-fetch all objects
>> git fetch origin
-Make the branch from the tag
>> git branch new_branch tag_name
-Checkout the branch
>> git checkout new_branch
-Push the branch up
>> git push origin new_branch
ex.
git checkout origin master
git fetch origin
git branch release_a_branch release_a_tag
git checkout release_a_branch
git push origin release_a_branch
@xeshan
Copy link

xeshan commented Nov 16, 2015

the short to fetch tag and checkout with this command

git checkout -b branchName tagName e.g. git checkout -b new_fixes v2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment