Open mishraprafful opened 2 years ago
Hi @mishraprafful, first of all thanks! I have some follow-up questions in order to see I fully understand your suggestion.
lakectl merge --strategy=theirs
My 2 agoroth: Some people hate rebases, some love them. Git offers both, and the Git* tools also offer them (e.g. GitHub offers rebase-and-merge as a way to pull PRs). People hate rebases because they rewrite commit histories. People (myself included...) love rebases because they rewrite commit histories and allow you to fix things after the fact. I think we should be unopinionated here and offer rebases. Clearly workarounds exist, and equally clearly they are not as good for the people who want the actual feature. Also, some of the issues with rebases vanish with lakeFS, because it is not a distributed view.
Hi @lynnro314
Also, thanks for your inputs @arielshaqed I think I completed agree with you.
@mishraprafful
With rebase we diff each commit with the base branch and effectively rebasing each commit separately, so we'll need to resolve conflicts (if there are any) with every commit. With that in mind, I would love to hear about your requirements for the rebase feature. Do you thinks adding strategy options to lakeFS merge functionality will be enough (at this point) to solve the difficulties of resolving conflicts? Or the rebase feature is important regardless of resolving conflicts?
@lynnro314 I think adding strategy options with merge works for us. I understand that having rebase adds more complexities in terms of resolving conflicts.
With the rebase, we would preserve all the commits that are added to the branch, and we wish to be able to revert to specific commits on the branches as well without having to keep the branches alive. So with rebase, we would be able to have all the effective versions of data on the main branch itself (i.e without losing individual commits on a branch, which we would if using merge to main)
However, once the rebase feature is rolled out we would use that instead of merge. But for now, having strategy options with merge works 🎉
@mishraprafful Thanks for your answers! With respect to this I opened a new issue regarding the merge strategies.
This issue is now marked as stale after 90 days of inactivity, and will be closed soon. To keep it, mark it with the "no stale" label.
Merging branches and resolving merge conflicts can be very difficult, It would be awesome if we have a rebase option also available.
Maybe we can choose a default option at the repository level? This somehow ties to integration with git, but I believe is a good feature on its own.