1

I'm using my own admin panel for multiple websites.

I have a git repository for just the admin panel, and a seperate git repository for every website.

So my question is: How can I update my admin panel easily. When I commit something to the admin panel repository, how can I automatically merge the new feature into the websites that are using that admin panel.

Do I need a plugin on my server for it or can I run some commands on the server every time something gets commited in the admin panel it merges with the other repositories.

1 Answer 1

2

You can use git submodules.

In every repository that depends on the admin panel repository, you should add a submodule. Say repo1 and repo2 depend on the admin panel.

 cd repo1/ git submodule add <admin_panel_repository_url> 

And that's it. If the admin panel repository has changed, you can update repo1 and repo2:

cd repo1/ git submodule update 

Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.