I fixed two errors in a piece of code and it modifies shared files. For example, bug 1, modified file A, B, C and bug fix 2, modified by B, C, and D are fixed. I have all the changes in one commit. For the purpose of code reviews, I need to split the changes into two commits (actually two branches).
I think from my current fix branch I am creating two branches like git branch fix-1 fix and git branch fix-2 fix . Both branches have all the changes. Now, in the fix-1 branch, I would like to save changes related only to fix 1, that is, all changes in file A and part of the changes in files B and C. Is it possible to do this in git? Which team is suitable for this?
I know that in git add I can do an interactive add where I can select the pieces of code to add, not just the file level. Is there something similar I can do here?
source share