Patchfiles and git

In git, I prefer the following workflow:

However, I had a fortune of working on a very large project of upgrading java infrastucture. One of the base libraries had thousands of changes after everything was set and done and rebasing the changes to clean up the git history was time consuming and required all people who worked together to advise on how to resolve merge conflicts. The solution to this tiresome problem is using a patchfile.

From this stack overflow answer,

git diff master Branch1 > ../patchfile
git checkout Branch2    
git apply ../patchfile

This saved me about an hour of working through the interactive rebase.

Hi!

I'm Daniil Kistanov. Welcome to my blog Subscribe

Currently, I work as a DevOps Engineer at Apple. My interests include Backend Engineering, Networking and Math related to CS.

You can reach out to me via LinkedIn or check my resume here.