git - maintaining your patches vs proprietary unversioned source

66 Views Asked by At

I feel like git "should" be able to handle this scenario, I think our case is slightly different than this: Maintaining custom patches on third party code

Basically our workflow is:

  1. Custom patches on proprietary website engine

  2. Website has its own upgrade process, overwrites all files

  3. Now we have differences introduced in the upgrade, as well as our patches

I do keep a separate repo of their point releases and I'm able to match this against our changes. Right now I patch these in manually.

It seems to me that I would have no way of handling this in a more automated fashion, unless there is an advanced workflow I could be taking advantage of?

1

There are 1 best solutions below

1
On

One possible workflow would be to commit each update from upstream to a branch (upstream), then keep your patch in another specific branch, that you rebase on every upgrade.

Before:

* C (upstream)
|
* B
|
| * (patches) patch2
| |
| * patch1
|/
* A

After:

  * (patches) patch2
  |
  * patch1
 /
* C (upstream)
|
* B
|
* A