If I git checkout develop - A, will there also be a cause for an unpleasant merge conflict in the future?
No, that alone will not be. Merge works by comparing each tip to a merge base and then comparing two sets of changes. If both branches make the same changes, no conflict arises.
Other changes in either branch, or too close to lines that have been changed in both branches, may appear as conflicts. A way to prevent this is to provide git with an accurate merge base by writing the merge from the shared content.
Now: the only effect of a $base merge is to record the common content as an ancestor for both branch tips, giving the merge from develop to master exact base from which other changes can be allowed.
The new commit returns the story in accordance with the practice given in the widely used successful git branching model .
If, in terms of how your team interprets the commits, leaving the original content of this common content recorded only in the text of the commit messages, it is preferable that git get this too. Instead of constantly writing down a pedigree, through checks and merges after assigning the base above, you can also
echo $(git rev-parse master master~) $base > .git/info/grafts echo $(git rev-parse develop develop~) $base >>.git/info/grafts git checkout master git merge develop
The origin recorded in .git/info/grafts is repo-local. Your merge teams will see it, and the result will be correct. The only drawback to this is that the database is not actually recorded. Others will have the same problem as repetition - it is very unlikely if you do not do criss-cross merges , as well as cherries in other industries.
source share