airy
airy

Reputation: 571

How can i share base code between rails projects with git?

I want to share (and keep updated) some base code between my rails projects with git. How can i do?

Upvotes: 2

Views: 631

Answers (2)

Igor Alexandrov
Igor Alexandrov

Reputation: 236

Do not use submodules. They are ugly, hard to understand and to maintain. Much better is to use subtrees.

Git subtree is a part of GIT since 1.7.11 and I wrote an article about sharing code between Rails applications: http://igor-alexandrov.github.com/blog/2013/03/28/using-git-subtree-to-share-code-between-rails-applications/

In short: yes git-subtree works and works great!

Upvotes: 0

Gareth
Gareth

Reputation: 138042

You can use git submodules, for example like this

Upvotes: 5

Related Questions