简体   繁体   中英

Merge develop into master

I'm merging develop into master though a website (eg 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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM