Git rebase or git merge?

I have two branches. Both are function branches - new-uiand video-upload. video-uploadis a fork new-ui.

However video-uploadhas TON commits. I have several developers working on new-ui, and one just completed video-upload. But I can’t understand what a cleaner option would be to combine these two.

I want to bring the completed work to video-uploadin new-ui, but I do not know if I want to completely delete all commits for video-uploadand create a new commit history for new-uinew commits. It looks like it will be dirty.

But at the same time, I want a clean merge of functions.

Work done on new-ui, as it video-uploadwas forked. Thus, the combining / combination will not be clean.

Given the above, which approach is best and why?

+4
source share
1 answer

A merger just for this is sending a version that includes development from two or more branches.

Rebase is designed to “rewrite history”: have a consolidated main trunk that includes commit from several branches, but looks like a monotonous stream.

+4
source

Source: https://habr.com/ru/post/1605633/


All Articles