I have a strange issue with SourceTree
. I merged my feature branch with the development
branch and it was ok. No problem.
Then I merged the development
to the main
branch. It says conflicts, but it doesn't show any conflicted files whatsoever. When I do continue the merging, it merged successfully, without any changes detected from my feature branch.
I realized it after a while because when I connect to the production DB (which I usually don't do), it shows a different schema than my local main branch. But when I tried to merge the development branch again, it doesn't pull the feature changes that I worked on. Anyone can explain this?
CodePudding user response:
Since the feature branch was already merge into dev
, merging dev
itself does not need/pull the feature branch (since it is already part of dev history).
But the best practice is to not merge integration branches (like dev or main).
Only merge feature branches (to dev first, then second merge of feature to main)
That way, you have:
- less conflicts
- only the feature branches you need in main (since not all of them are always eligible for
main
)
CodePudding user response:
I ended up deleting my local main
branch and recreate it from the development
branch. This answer doesn't explain what was happening so feel free to add more answers.