1

I am working on a forked version of a open-source project which is written in golang. The problem is, while I do some modifications in my private repo, I realised that the opensource also releases important modifications to the project.

When I do merge from upstream, there are huge amount of conflicts to solve. Then, I decided to move my private logic, modifications, to separate files and added new functions and embedding structs(in golang terms). Now conflicts are much lesser. But still I have to check those modified functions manually.

Any better approach to tackle this task? How big tech companies do this in production? Maybe setup a CI/CD to do this automatically and solve conflicts automatically? Any ideas appreciated. Thank you.

2
  • Can you just submit your changes upstream? IME big tech companies may be willing to directly sponsor the open-source project, and there are also prominent examples of big tech companies forking open-source to avoid this. Commented Sep 19, 2024 at 15:06
  • I am using my private fork for private server deployments. Modifications means changing security logic, API and etc. which is not needed for open-source project Commented Sep 19, 2024 at 15:18

1 Answer 1

0

Did you try to use rebase? I used rebase instead of merge to make less of conflict. When you merge, it combines all of branch changes. In contrast, rebase takes your changes, and put them on the top of latest upstream commit.I got this when I read the document about comparing merge and rebase.

Sign up to request clarification or add additional context in comments.

3 Comments

If you have couple changes, couple commits, it works. But when it comes to the new files, lots of modifications, merge looks easier than rebase.
Yeah, i agree with you. Merge is easier but rebase has its benefit. When rebasing we can follow the project's flow which is very helpful for me.
I also search for the solution you ask, the big tech company they use microsevice

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.