Reputation: 289
I'm merging develop
into master
though a website (e.g gitlab
).
Squash commits into 1 commit is a feature proposed by gitlab and I used it.
Problem: When I do new changes on develop
(and being sure there is no conflict with master
), it's not possible to make a merge request without conflict. I guess master
and develop
have different histories so it requires several commands more to make develop
ready to be merged again into master
Should I fast-forward rebase master
into develop
? Recreate the branch develop
based on master
or another process?
Upvotes: 1
Views: 7824
Reputation: 1181
Generally, in order to keep a clean merge history, doing a git rebase
on the develop
branch is desirable. That is how the Linux kernel expects things, for example.
So you would do something like the following:
(Assuming you are on your develop
branch and master is in sync with origin/master
)
git rebase master
# Resolve any conflicts and commit
git checkout master
git merge develop
Upvotes: 3