views:

61

answers:

1

Along the same lines as this question - How do I clone all remote branches with Git?, if I have set up a Github repository like so:

$ 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

... How do I make it so the original [email protected]:viatropos/spree.git project ignores anything in the vendor/extensions directory, while the [email protected]:viatropos/mycart.git project doesn't, given there's only this one main project/directory (mycart)?

A: 

You mean .gitignore by "ignores anything in ..."? This file is also versioned, so you can add vendor/extensions to .gitignore on one branch and remove it on another

MBO