I work on an Android project and I made a mistake. I have committed all my work on the wrong branch ! Now I want to repair it and I will use some git commands to achieve that goal. These commands are cherry-pick and rebase.
This article is the first of three where I explain how to correct this. The others are available here:
- 2 – [will be released soon] Split an old commit in N commits
- 3 – [will be released soon] All my commits are on the wrong branch ! (git rebase –onto case).
The current situation
I have 5 branches but the 3 most important ones are: