In my working branch, I have three dependent patches. All of them not merged.
<commit id -1>
<Commit id -2>
<Commit id -3>
How can i add new changes to <Commit id -2>
?
Currently here is how I am doing it.
git stash
git reset --hard HEAD~1
git stash apply
git add .
git commit --amend
git cherry-pick <commit id -1>
This is working without any problem. But is there a better way where I can commit the staged files to whichever commit I want?