Posted 02/28/2024
This will revert the commit, but put the committed changes back into your index. Assuming the branches are relatively up-to-date with regard to each other, git will let you do a checkout into the other branch
git reset --soft HEAD^
Switch to you branche
git checkout -b <branch>
Commit the changes. In case you want to use original commit message, you can use -c ORIG_HEAD
git commit -c ORIG_HEAD