Sometimes this is unavoidable, for example if you make a fix on develop and then realize you need that in the existing release branch. Or, if you have a bug fix to release, merge it in there and then merge release down to develop. For example, if you have a hotfix to production, merge the fix into master, and then merge master down to release if it exists, or develop if it doesn't. Instead, merge it into the higher branch first and then merge that branch down into the lower branch. If you're going to have conflicts you should have them at that merge, for example, if the same files you modified in that bug fix were also modified on develop.Īs a rule of thumb, you should rarely ever merge the same branch into two shared branches. Instead, if you merge a bug-fix into release, you should be merging the release branch back down into develop. If you merge a bug fix branch into release, and then turn around and merge that same bug fix branch into develop and if the commit IDs end up being different on each branch, then you definitely could get conflicts later on when those commits on develop end up getting merged into master. The most likely cause would be at this step of your workflow: So now let's try to figure out why you do have conflicts. I agree with you that you should never have conflicts when merging release into master. Do I need to merge master into develop so develop has those to commits even though there would be no file changes?įirst off, I'm assuming you're using the documented Git Flow, or a close variant. The two commits ahead of develop are the merge commits from the release branches into master. In dev ops it states that my master branch is 100 commits behind develop (which is correct as there have been changes since that release) but that it is 2 ahead of develop. Its like the master branch doesn't realise that the code in develop came after or something. Now any time I change a file in develop and then try merge into master I get a conflict. So I had to take all changes from the release branch OVER the conflict from the master branch to finish the merge. But I thought that merging into master would just overwrite anything in master since these are the latest changes. However, any time I want to merge release into master I got a plethora of conflicts. At this point master has everything for the release and everything that is in develop apart from any new features added after the release branch was made. When release is ready I merge the release branch into master. The process I have been following for a release are:Ĭreate release branch off of develop when ready for release.Īny bugs that are fixed during this time are merged into the release branch and into develop I am a little confused as to whats happened to my branches.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |