我是Git Hub新手,对标签和分支的概念感到困惑(解释为here) 我想从git hub获得稳定版本的PhantomJS(版本2.1.0)。但我不明白,如果我应该做的:Github Branch,标记:如何获取特定版本的代码?
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
或
git init
git remote add -t 2.1 -f origin https://github.com/ariya/phantomjs.git
git checkout 2.1
请你给我解释一下哪一个,为什么?