Praise be to Allah
If a man says to his wife: If you do not do that, or if you’re not happy to live with me, then you can go, and I don’t need you, this is not an explicit divorce (talaaq); rather it comes under the heading of metaphors for divorce, and metaphors for divorce do not count as such unless they are accompanied by the intention of divorce.
Please see: al-‘Inaayah Sharh al-Hidaayah (4/64); at-Taaj wa’l-Ikleel (5/329); Asna al-Mataalib (3/271); al-Furoo‘ (5/387); al-Insaaf (8/476).
The view of the Hanafis and Hanbalis is that a metaphor for divorce counts as a divorce if there is circumstantial evidence to support that, such as if he said that in anger, or she asked him for a divorce and he said to her, for example, Go and join your family, or I don’t need you.
See: al-Mawsoo‘ah al-Fiqhiyyah (29/27).
It says in Zaad al-Mustaqni‘: Words that may be understood as a metaphor for divorce do not count as a divorce unless the intention accompanies the words, except in the case of a dispute or anger, or answering her request. End quote.
The more correct view is that a metaphor does not count as a divorce unless it is accompanied by the intention;, dispute or anger alone is not sufficient.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said in his commentary ash-Sharh al-Mumti‘,:
These are three situations in which a metaphor for divorce counts as such without the intention. Dispute means a dispute with his wife, whereupon he says: Go to your family. In this case it counts as a divorce even if he did not intend it as such, because we have circumstantial evidence to indicate that what he intended was to divorce her.
In the event of anger, even if there is no dispute, such as if he tells her to do something and she does not do it, so he gets angry and says: Go to your family. This counts as a divorce even if he did not intend it as such.
Answering her request means that she said: Divorce me, and he said: Go to your family. This counts as a divorce.
But the correct view is that a metaphor does not count as a divorce unless it is accompanied by the intention, even in these situations, because a person may say in anger Get out and the like, without having the intention of divorce at all.
End quote from ash-Sharh al-Mumti‘ (13/75).
So if the husband did not intend to issue a divorce thereby, then it does not count as such, if the wife did not do what he wanted her to do. If he did intend to issue a divorce thereby, then it counts as a divorce if the wife went against what he wanted when he said that.
If he does not know what his intention was, or he forgot what it was, then it does not count as a divorce, because the basic principle is that the marriage remains valid.
And Allah knows best.