In order to preserve the readability of the repository and the history of changes, it is good practice to combine multiple snapshots in the theme branches (feature / bugfix / hotfix). This can be done with the command git rebase, which moves the branch to any place in the repository (graph) with the possibility of performing certain operations on the snapshots, including joining them. Before merging snapshots, always execute the command git fetch or git pull on the branch to which you want to move the branch – usually this is the branch develop, so the one from which the theme / featurefix theme branches should originate.
An example of merging snapshots into one:
The result of such a rebase command will be two snapshots – one with Developer A changes and the other with Developer B changes.
As you can see above, it is acceptable to change the sequence of processing individual snapshots, but you must be aware that this approach will not always work. There may be a situation where the file modification snapshot will be applied before the file that it adds to the repository.