tags:

views:

23

answers:

1

I am trying Git, and so if i do

mkdir foo
cd foo
git clone git://github.com/some_repo/sdk.git

so my project folder will now have sdk, which is a library or an sdk. How to make sdk part of my project now? That is, just 1 repo instead of git init and have 2 separate repos?

+1  A: 

If project sdk:

  • is not developed at the same pace than your foo project (i.e. changing anything in foo doesn't always involve changing sdk, and changing sdk doesn't mean changing foo)
  • must have sdk as a sub-directory

, then, as Scott comments, a submodule approach is useful, because (as I describe in "true nature of submodules") you will be able to:

  • reference a specific version of sdk
  • while still being able to modify sdk directly from within your foo project.

Yes, they will be two separate repos, but you can still manage them from the parent repo foo.

VonC
One repo would mean " **subtree merging** " (http://stackoverflow.com/questions/908087/how-to-version-project-schedules-to-dos-wikis-etc-in-git/908892#908892), but you would loose any link between sdk and its original github repo.
VonC