I’m using git flow, and without thinking, I’ve commited code to the wrong branch (feature), and then published it.
I need to take that code, remove it from say, branch 1, and move it into the correct branch, which is branch 2.
All the files are stored within one folder which could make things a lot easier, I’m just unsure on how to go about this.
eg.
Branch 1 {
Commit That contains {
./path/to/files_that_should_be_here
./path/to/files_that_need_to_be_in_branch_2
}
}
Branch 2 {
No Commits.
}
to move the commit to right branch use
in the branch you want to move commit to.
And to remove the commit from that branch
use