We have to keep 2 product versions. Now, some changes in each version have to be backported to another version.
In SVN, if I made “change” to version 1, I merge this revision to version 2 and give comment like: “Merged ‘change’ from v1”.
This is awkward in many ways. Even worse if I merge several changes.
Can git help me to have single change being promoted to both branches, so that revision comment, date, everything belong to one commit for both versions, after I “merge” 1v1 to be part of second branch?
As far as I know, Git doesn’t allow a single commit to affect multiple branches.
But an interesting approach about Git is that it doesn’t just applies patches from the branch to another when merging. When you merge commits from a branch to another, Git actually keeps commit messages between branches.
So when you use Git merge command, all commits informations are conserved : author of the commit, commit message, date, and even commit ID. So all the informations about the commit are preserved when merging.