reset and apply the patch in the current branch