Search code examples
gitwebformsazure-devopsgit-forkreplicate

Replicate changes of 1 fork to others


here we have lots of forks. We have a product that is a base, and the client can custumize it a lot. Every fork is a product, but their structure are very different, and sometimes we need to replicate some changes to our base product.

Right now I need to send a few isolated commits to our base fork, we call it Demo. After that i need to make some adjustments.

Can you guys help me out with that, is there a way of sending a few commits to other fork Locally.

I have the 2 solutions Downloaded in my computer: c:/git/[forkname]

Demo. ClientFork.


Solution

  • Well I just find a way of doing that!

    Reading that gave me some ideas to pick some commits. And that post here help me solving some issues that appeared in the process.

    if you have a single commit you can do this:[Well if you have more then one commit I recommend cherry-picking then and squashing then]

    git format-patch [your commit hash here]-1 
    

    After that a patch will be create in the project folder with 1 single commit inside. After that open the other project in command line and use the following code:

    git am [patch path here]
    git am --reject
    git am --continue
    git am --skip
    

    well after that the changes will be present in the project, and some changes that git couldn't handle will be in [file].rej and you will have to finished this changes by hand. But most of then will be fine.

    after finishing everythin just commit and push.