I have multiple commits done on a branch for a C project and would like to squash them into just two commits.
Commit 1 - should have only the changes to the actual functionality source code
Commit 2 - should have the changes to the test code only
The problem is, the commits are not in squence for the functionaly code and test code , for example below, when git rebase -i <hash>
is run :
pick 626e9699 src : first src commit
pick 07535353 src : second src comit
pick 9c768710 test: first test commit
pick 985f9f33 src : third src commit
pick fef22111 test: second test commit
pick 3e4e5991 src : fourth src commit
I have squashed commits when they are in the right order before without issues, but wondering how this would work. Thanks in advance