Skip to content

Instantly share code, notes, and snippets.

@fajrif
Created October 5, 2011 18:12
Show Gist options
  • Star 30 You must be signed in to star a gist
  • Fork 22 You must be signed in to fork a gist
  • Save fajrif/1265203 to your computer and use it in GitHub Desktop.
Save fajrif/1265203 to your computer and use it in GitHub Desktop.
git clone specific tag
git clone <repo-address>
git tag -l
git checkout <tag-name>
git branch -D master
git checkout -b master
@stratigos
Copy link

simple, thanks

@nivance
Copy link

nivance commented Jun 17, 2015

git checkout -b branch_name tag_name

@owen-rpx
Copy link

owen-rpx commented Aug 2, 2017

thanks ,very helpful.

Copy link

ghost commented Aug 22, 2017

Thanks brother!

@dhajoshi
Copy link

git clone -b tag

@kishorpawar
Copy link

Can I something similar like git fetch <remote> branch:branch with clone?

like git clone <repo> -b Release-3.5.7:Release-3.5.7 <dir> which will clone from tag and create a branch with same name?

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