respectTheCode
respectTheCode

Reputation: 43116

How can I use git for a framework and for a project using that framework while keeping the project separate?

We are developing a web application and the framework under it. I would like to be able to use the framework for other projects and I am even considering making the framework open source.

Right now each developer has 2 separate folders, one for each. I then have a 3rd folder with symlinks to the files in the to git project folders. This works but we have pull both the framework and the app and if they get out of sync nothing works.

We are going to be starting the second app using the framework soon.

Is there a better way to do this?

Upvotes: 2

Views: 129

Answers (2)

developmentalinsanity
developmentalinsanity

Reputation: 6249

Having not used git for anything serious, I can't be certain, but I'd guess you want git's equivalent to subversions svn:externals property.

Some googling indicates that you may want to use submodules. This article may help you.

Upvotes: 4

Marcelo Cantos
Marcelo Cantos

Reputation: 186098

You might find that git submodules do what you need. They are similar to svn externals. The idea would be to house the framework as a submodule inside your project.

Upvotes: 3

Related Questions