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 git@github.com:viatropos/spree.git mycart
$ cd mycart
$ git branch
* master
$ git remote add origin git@github.com:viatropos/mycart.git
fatal: remote origin already exists.
$ git remote add myfork git@github.com: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 git@github.com:viatropos/spree.git project ignores anything in the vendor/extensions directory, while the git@github.com:viatropos/mycart.git project doesn't, given there's only this one main project/directory (mycart)?

Community
  • 1
  • 1
Lance Pollard
  • 66,757
  • 77
  • 237
  • 416

1 Answers1

1

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
  • 27,873
  • 5
  • 47
  • 52