I have a branch A and a branch B. Branch B is three commits ahead of A.
I can use git diff
to list the changed files between A and B.
But my question is: How can I checkout all those changed files between A and B while I am on A, then commit them altogether into A as one commit?
If
B
is strictly ahead ofA
(and not behind it), then you can simply run "merge --squash":