The invention relates to a method for treating hair using a composition comprising: at least one organic solvent, less than 5% by weight of water relative to the total weight of the composition; one or more silicone-functional polymers bearing alkoxy (aminomethyl) -silyl functional groups. L'invention concerne un procédé de traitement des cheveux mettant en œuvre une composition comprenant : - au moins un solvant organique, - moins de 5% en poids d'eau par rapport au poids total de la composition ; - un ou plusieurs polymères à motif silicone porteur de groupements fonctionnels alcoxy-(aminométhyl)-silyle.