The ruling on jihad for women
Question

This is an import matter about which I am confused. What is the ruling on jihad for women?.
Praise be to Allah.Jihad is not obligatory for women. Ibn Qudaamah (may Allaah have mercy on him) said: 
In order for jihad to be obligatory there are seven conditions: being Muslim, being an adult, being of sound mind, being free, being male, being physically sound and being able to afford it financially. With regard to being Muslim, adult and of sound mind, these are essential conditions for all Islamic duties, because a kaafir is not to be trusted in jihad, an insane person cannot go for jihad and a child is physically weak. Ibn ‘Umar said: “I presented myself to the Messenger of Allaah (peace and blessings of Allaah be upon him) on the day of Uhud when I was fourteen years old, and he did not let me join the fighting.” Agreed upon. … With regard to being male, this is stipulated because of the report narrated from ‘Aa’ishah who said: “O Messenger of Allaah, do women have to engage in jihad? He said: “Jihad in which there is no fighting: Hajj and ‘Umrah.” And because women are not able to fight because they are (physically) weak. 
From al-Mughni, 9/163. 
The hadeeth of ‘Aa’ishah (may Allaah be pleased with her) was narrated by Ahmad (25361) and Ibn Maajah (2901); classed as saheeh by al-Albaani in Saheeh Sunan Ibn Maajah. 
Can a woman go out to help the mujaahideen and treat the wounded? 
Al-Sarkhasi said in Sharh al-Siyar al-Kabeer (1/184): Chapter on women fighting alongside men and being present in war: He said: we do not like women to fight alongside men in war because a woman does not have the right physical make-up for fighting, as the Messenger of Allaah (peace and blessings of Allaah be upon him) indicated when he said: “This one was not a fighter” (said when he saw the body of a woman slain on the battlefield). And when a woman fights, the ‘awrah of the Muslims may become exposed and the mushrikeen will rejoice at that, and that may be a cause of the mushrikeen increasing their hopes of defeating the Muslims, and they may think that the Muslims are weak because they had to bring the women to fight, so they will say, ‘They need the help of women to fight us.” So this should be avoided. For this reason it is not recommended for women to participate directly in the fighting. But if the Muslims have no choice and are forced to do that, because repelling the kuffaar when necessary by whatever means the Muslims have at their disposal, is permissible, rather it is obligatory. The story of Hunayn is quoted as evidence for that. 
At the end of this story it says: Umm Sulaym bint Milhaan, who was fighting that day with a cloth tied around her stomach, said: “O Messenger of Allaah, what do you think about these people who ran away from you and let you down? You should not forgive them if Allaah gives you power over them.” He (peace and blessings of Allaah be upon him) said: “O Umm Sulaym, the forgiveness of Allaah is immense.” She repeated that three times, and each time the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “The mercy of Allaah is immense.” In al-Maghaazi it is narrated that she said: “O Messenger of Allaah, should we not kill these who ran away (from the battlefield) as we killed the mushrikeen?” He (peace and blessings of Allaah be upon him) said:  “The forgiveness of Allaah is immense.” What greater need can there be for women to fight than this incident when the men fled and abandoned the Messenger of Allaah (peace and blessings of Allaah be upon him). This clearly shows that there is nothing wrong with women fighting when that is essential, because the Prophet (peace and blessings of Allaah be upon him) did not prevent this woman from fighting on that occasion. But it is not narrated that he gave the women permission to fight on other occasions. There is nothing wrong with old women being present at times of war to tend the wounded, bring water and cook food for the soldiers if they need that, because of the hadeeth of ‘Abd-Allaah ibn Qarat al-Azdi who said: The womenfolk of Khaalid ibn al-Waleed and the womenfolk of the Sahaabah had their sleeves rolled up, bringing water to the mujaahideen and reciting encouraging poetry, when he was fighting the Byzantines. What is meant here is old women, because young women are not allowed to go out for fear of fitnah, and old women can take care of the needs in such situations. And it was narrated that Umm Mutaa’, who was present at Khaybar with the Messenger of Allaah (peace and blessings of Allaah be upon him), said: I saw Aslam (one of the Arab tribes) when they complained to the Messenger of Allaah (peace and blessings of Allaah be upon him) about the difficulties they were facing, so he recommended that they engage in jihad and they responded. I saw that Aslam were the first ones to reach the fortress and the sun did not set on that day until Allaah had enabled us to conquer it. 
This clearly shows that she went out with the Messenger of Allaah (peace and blessings of Allaah be upon him), and he did not forbid her to do so. From this we know that there is nothing wrong with an old woman going out to help the mujaahideen by doing tasks that are appropriate for them. And Allaah is the Source of strength. End quote. 
It says in Khishshaaf al-Qinaa’ (3/26): Women are not allowed (to engage in jihad) because they are a source of temptation, as well as not being qualified to fight, because of their natural tendency to be weak and cowardly, and because there is no guarantee that the enemy will not capture them and regard it as permissible to do to them that which Allaah has forbidden. Some of the scholars said: except the wife of the ruler or commander, who may be present to attend to his needs, because of the actions of the Messenger of Allaah (peace and blessings of Allaah be upon him), or an old women in cases of need only, such as giving water to the troops and treating the wounded, because al-Rubayyi’ bint Mu’awwidh said: “We used to go out to fight with the Prophet (peace and blessings of Allaah be upon him), bringing water and serving them, bringing back the wounded and the slain to Madeenah.” Narrated by al-Bukhaari. And a similar report was narrated from Anas by Muslim. That is because men may be distracted from these tasks by fighting, so this is a help to the Muslims and supporting them in their fight. 
All of this has to do with jihad in cases where the enemy has not invaded the Muslim land, in which case jihad becomes obligatory on every able-bodied person, man or woman, and a woman may then go out without her husband’s permission. Al-Kaasaani al-Hanafi (may Allaah have mercy on him) said: “But at times of general mobilization, such as when the enemy is seeking to invade a Muslim land, then it becomes an individual obligation (fard ‘ayn) on every single Muslim who is able to fight, because Allaah says (interpretation of the meaning): 
“March forth, whether you are light (being healthy, young and wealthy) or heavy (being ill, old and poor)”
[al-Tawbah 9:41]
It was said that this was revealed concerning general mobilization. 
And Allaah says (interpretation of the meaning): 
“It was not [proper] for the people of Madīnah and those surrounding them of the bedouins that they remain behind after [the departure of] the Messenger of Allah or that they prefer themselves over his self.”
[al-Tawbah 9:120]
From Badaa’i’ al-Sanaa’i’, 7/98 
It says something similar in al-Sharh al-Sagheer, one of the Maaliki books (2/274): that if the enemy attacks a Muslim land, then jihad becomes an individual obligation for every man and woman. 
In conclusion: 
Jihad is not obligatory for women in principle, except in cases of necessity, such as if the kuffaar attack a Muslim land, in which case jihad becomes obligatory for women, according to their abilities. If a woman is not able to fight then she is not obliged to do so, because Allaah says (interpretation of the meaning): 
“Allaah burdens not a person beyond his scope”
[al-Baqarah 2:286]
And Allaah knows best.