Provided is a method for styling hair that includes contacting the hair with a compositions that includes a poly(vinylamine-vinylformamide) copolymer and conditioning agents, applying heat to the hair in an amount effective to at least semi-permanently style the hair, and styling the hair. The method of the present invention promotes improved hair styling properties such as improved curl retention or straightness retention, e.g., under conditions of high relative humidity and temperature. The method can be used for semi-permanently straightening or curling the hair.