I just recently started using git flow and there's something I don't quite understand. First, I never do anything directly on develop. If I do something I either use a start a hotfix or feature.
My plugin was at version 1.1.5 when I started a new feature ('sequentialUpgrades'). That was 4 days ago. In the last 4 days, while having not finished this new feature, I completed 2 hotfixes, so those were merged back into master, then develop upon finishing them and on both of those branches of course I have the latest changes including the hotfixes and am at version 1.1.7... If I do a git diff master develop
, there's no difference.
Now when I went back into my feature branch to continue dev'ing this new feature, the feature branch is still back at 1.1.5, so I don't have the 2 latest hotfixes.
So I have 2 questions:
I was thinking to merge develop into the feature branch, but I don't think that's right way to go about it. But, I would really like, scratch that NEED these last 2 fixes present while developing this new feature.
Because I started this feature back at 1.1.5. In the feature branch I made significant changes to a file access-level.php. When I did the hotfixes I changed maybe 5-6 lines in the same file. How can a file who is all they way back at 1.1.5 with some significant changes be merged into the same file at 1.1.7 which has had changes since then as well?
There's nothing wrong with occasionally merging develop into your feature branch to keep it up to date. git is pretty good at merging, but if both branches touched the same parts of a file, you'll probably have to resolve some conflicts manually. I prefer to use a graphical merge tool for conflict resolution, see e.g. this guide for some tips how to set that up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With