1

Here is my setup - please correct me if i should do it another way.

I have a php script that use various template files(html&css) to obtain different looks but with the same functionality.

I have a repository for the core script(local server). On this repository i do the bug fixing and the new features. At this point i want to develop a new version of the product. I created a private repository on github where another developer will do template related commits and maybe some extra features.

My question is: How do i "copy" a commit from my local core repository(say a bug fix) to the new github repository ? I did a test with "patches" and it seems to work but i'm not sure this is the way to go. Do you think i should setup my repositories in another way ? Thanks

1

1 Answer 1

1

To me, it sounds like the front-end repository should subscribe to the backend repository as a git submodule.

git submodule add ssh://myserver.com/myrepo.git backend 

Which would clone the myrepo.git into a folder called backend in the frontend. Then you can simply cd backend and git pull to get updates, or check out branches, or anything else you can do with a git repo.

This may require a little reworking on how the frontend is coded and how the whole thing is structured, but submodules are for allowing one repository to use another when there is no package management system in place to do it.

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.