Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share code between rails projects [duplicate]

Tags:

git

Possible Duplicate:
Can you share a file and it's history between two git repositories?

I have multiple rails projects (in one git), which have some common CSSs, layouts and helpers. My first solution to share those files between the projects was to set up some symlinks, but I'm not totally convinced this is the way to go. Is there some nicer solution, or are symlinks maybe fine after all?

like image 834
lucas clemente Avatar asked Sep 06 '26 11:09

lucas clemente


2 Answers

You can use git submodules to split out the common parts.

Check this out: http://railscasts.com/episodes/96-git-on-rails Or: http://git-scm.com/docs/git-submodule

like image 125
Brian Avatar answered Sep 08 '26 03:09

Brian


Yes, symlinks is a good way to go, i would probably do that as well.

like image 38
Spyros Avatar answered Sep 08 '26 04:09

Spyros



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!