1
沿着相同的路線,因爲這問題 - How do I clone all remote branches with Git?,如果我已經設置了Github上庫,像這樣:兩個Git倉庫的項目部分 - 如何忽略不同的文件?
$ git clone [email protected]:viatropos/spree.git mycart
$ cd mycart
$ git branch
* master
$ git remote add origin [email protected]:viatropos/mycart.git
fatal: remote origin already exists.
$ git remote add myfork [email protected]:viatropos/mycart.git
$ git branch -a
* master
origin/0_8_5
origin/0_9_2
origin/494-rake-task-for-default-data
origin/598-ruby-19
origin/611-refactor-charges-to-use-calculators-and-be-polymorphic
origin/811-refactor-payment-gateways
origin/HEAD
origin/master
origin/nested_attributes
origin/slicehost
origin/taxonomy_landing
origin/v9_592_tmp
$ git checkout -b slicehost origin/slicehost
Branch slicehost set up to track remote branch refs/remotes/origin/slicehost.
Switched to a new branch "slicehost"
$ git branch
master
* slicehost
...我如何使它所以原來[email protected]:viatropos/spree.git
項目忽略了供應商/擴展什麼目錄,而[email protected]:viatropos/mycart.git
項目沒有,因爲只有這個主項目/目錄(mycart)?