I am in branch B. After a bunch of commits, several files are ready / needed by branch A, but many of them are not ready / needed. I want to merge only those files, keeping a proper git history. Later, when I really merge, I donβt want to mislead the trace of the origin of these changes - they should correctly refer to the commits from which they came, although the changes in other files that were part of these commits were not merged (yet). I assume that this means that dividing commits into pieces that do against does not apply to these files.
All proposed solutions for this wind lose the history of these changes and cause a big problem when I later want to combine B into A, but some of the B-changes already exist. I want a solution that avoids this.
In the turtle, I can look at the log for one file and select the previous version to return. So basically, I could create a new C branch from B and return all the files that I don't want to merge with to the point where B is forked with A. Then I could merge C into A. It seems to be correct to track the git history and allows me to combine B into A, not surprising that some changes to B already exist.
But it hurts to manually identify and return 20 files when I just want to merge 2. Why is this not an ordinary one-step operation? How the turtle will return work - since it can work with one file, it should be a sub-commit, which is the important function I'm looking for. Does this discard the fact that I am moving from a newer version to an older one, and make it look like I just made some manual changes that would then conflict with the possible merging of B back to A?
user1441998
source share