The situation:
Starting with the Master at A
I branched and made some changes at B
then merged that branch back in (C)
. After making some more changes I was at D
but found I needed to deploy the code without the changes that happened in the branch. If I hand't merged it that would have been fine.
A_______C___D
\ /
\_B_/
Firstly I'd like to know what I should have done from here to deploy the code as if the merge never happened. Note: none of the same files that were edited in the branch have been edited in the master.
Secondly...
I didn't have time to work out the best method to deal with this, so I deleted the files which the branch added, and manually reverted a few edits made in the branch then commited the result for deployment (F
)
A_______C___D___F
\ /
\_B_/
I want to be able to keep developing the branch and merge any changes from the master into it to keep it up to date, but if I do that the stuff I did to create F
will be merged in and cause the files to be deleted and the edits to be reverted. What is the best way to deal with this?