github - Switch to another Git tag -


how check out version version/tag 1.1.4 of rspec bundle?

cd ~/library/application\ support/textmate/bundles/ git clone git://github.com/rspec/rspec-tmbundle.git rspec.tmbundle osascript -e 'tell app "textmate" reload bundles' 

clone repository normal:

git clone git://github.com/rspec/rspec-tmbundle.git rspec.tmbundle 

then checkout tag want so:

git checkout tags/1.1.4 

this checkout out tag in 'detached head' state. in state, "you can around, make experimental changes , commit them, , [discard commits] without impacting branches performing checkout".

to retain changes made, move them new branch:

git checkout -b 1.1.4-jspooner 

you can master branch using:

git checkout master 

note, mentioned in first revision of answer, there way checkout tag:

git checkout 1.1.4 

but mentioned in comment, if have branch same name, result in git warning refname ambiguous , checking out branch default:

warning: refname 'test' ambiguous. switched branch '1.1.4' 

the shorthand can safely used if repository not share names between branches , tags.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -