Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing rails plugins as git submodules

(Why there is no|Is there a) way to run

./script/plugin install -SOME_HIDDEN_OPTION git://github.com...

So that the plugin is installed as git submodule. The reason for submodules is to keep unrelated code off project's repository.

Perhaps there is a reason not keep plugins as submodules?

like image 539
artemave Avatar asked Feb 06 '26 14:02

artemave


2 Answers

./script/plugin install git://github.com/something/something...

Should work without a submodule...

If you want to update the plugin, just navigate into that plugin's folder and do a git pull.

The only advantage of the submodule is that you can see all your submodules from anywhere in the git repository. Otherwise, git just find the nearest git repository and works on that... in te above case, navigating to the plugin's directory will make it the repository you are working on.

like image 126
phillc Avatar answered Feb 08 '26 13:02

phillc


Submodules are a bit warty. Also if you clone your repo and one of your submodule remotes is down you're stuck.

I end up tweaking the local code on occasion as well, which necessitates it being in my repo.

Braid makes managing this situation simple.

like image 24
Jason Watkins Avatar answered Feb 08 '26 15:02

Jason Watkins



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!