Workflow help

I pay for a Wordpress plug-in that does not have all the functionality I need.  I want to put the code for it in a git repository and then modify it to meet my needs.  These changes will never be seen by the developers of the original project, nor will they be merged into their code.  However, I want to periodically merge their latest release changes into my code so I do not lose the new functionality they add to plugin.

I can imagine ways of doing this by creating two repositories, one for their releases, and one for my modified copy, then trying to merge the patches from each of their changes into the code I have.  Or doing the same with a single repository, one with a branch just for their code that updates each time they make a release, and a branch with my code that I periodically try to pull in their latest changes into.  I imagine either of these would be fairly simple for 6 or 12 months, until the code becomes so different it becomes very complex to merge their changes into mine. 

I am new to git, and have not used any VCS or been active in development for over 15 years.  But I imagine this must be a common thing people do with opensource software; they find something they need, create a custom version of it for private or limited use, then try to merge in the latest changes that come from the original developers periodically so as to keep it moving forward. 

Is there a recommended way of doing this?  Branches (Forks?  I’ve read a bit about forks but that does not seem to be the answer).  Second, it is feasible for a project with 1000’s of source files?  And is that feasibility limited by time or major code changes?  Any help is greatly appreciated. 

Using branches would indeed be the git way to do that. Generally you’d merge from a branch containing the unmodified (“upstream”) code into one with your modifications.

Whether maintaining your changes like that is feasible doesn’t really have to do anything with git, and more with things like:

  • How big are your changes? Do they change deep underlying structures?
  • Do the upstream developers keep the internal API (mostly) stable?
  • How much time to you have for this?

You mentioned paying for the plug-in, so maybe as a customer you could request support for some sort of extension API. If the API you need for your modifications stays mostly stable the latter will be much easier to maintain.

1 Like

Thank you so much.  That is what I will do then.

I do not think our changes will be extensive but we will see as time goes on. 

1 Like