I'm new to Git hub and I got confused about the concept of tag and branch(explained here) I would like to get an stable version of PhantomJS(version 2.1.0) from git hub. But I don't understand if I should do:
git checkout master
git remote add upstream https://github.com/ariya/phantomjs.git
git fetch upstream
git rebase --onto tags/2.1.0 upstream/master master
or
git init
git remote add -t 2.1 -f origin https://github.com/ariya/phantomjs.git
git checkout 2.1
Would you please explain me which one and why?