here's my problem:
I have this development branch which I am supposed to get my new branches from it.
I took this branch named descendingOrder
and committed and pushed everything I wanted to do.
Then I had a totally different and new task. so when I was in descendingOrder
I used the command git checkout -b featureTest
and made a new branch. but I had two mistakes here:
1- My last commit on descendingOrder
was supposed to be on the new branch feature test
. but I mistakenly committed it on descendingOrder
.
2- The feature test
branch was supposed to be taken from the development
branch. but I mistakenly took it from descendingOrder
.
Now I want to move back the feature test
to development
and also add the last local commit of descendingOrder
at the first of the new featured branch.
I also saw this link but it didn't help much.
feature test
branch then rebase it ontodevelopment
, removing the commits you don't want during the rebase. You can then hard reset thedescendingOrder
branch back one commit to remove the unwanted commit.