开发者

Project Part of Two Git Repositories - How to Ignore Different Files For Each?

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)?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜