我是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
請你給我解釋一下哪一個,爲什麼?