Hadith no. 2651 (below) is a repeat. Read it here.
Volume 4, Book 52, Number 255 :
Narrated by Abu Burda’s father
The Prophet (sallallaahu `alayhi wasallam) said, “Three persons will get their reward twice. (One is) a person who has a slave girl and he educates her properly and teaches her good manners properly (without violence) and then manumits and marries her. Such a person will get a double reward. (Another is) a believer from the people of the scriptures who has been a true believer and then he believes in the Prophet (Muhammad). Such a person will get a double reward. (The third is) a slave who observes Allah’s Rights and Obligations and is sincere to his master.”
Volume 4, Book 52, Number 256 :
Narrated by As-Sab bin Jaththama (radiallaahu `anhu)
The Prophet (sallallaahu `alayhi wasallam) passed by me at a place called Al-Abwa or Waddan, and was asked whether it was permissible to attack the pagan warriors at night with the probability of exposing their women and children to danger. The Prophet (sallallaahu `alayhi wasallam) replied, “They (i.e. women and children) are from them (i.e. pagans).” I also heard the Prophet (sallallaahu `alayhi wasallam) saying, “The institution of Hima is invalid except for Allah and His Apostle.”
Volume 4, Book 52, Number 257 :
Narrated by ‘Abdullah (radiallaahu `anhu)
During some of the Ghazawat of the Prophet (sallallaahu `alayhi wasallam) a woman was found killed. Allah’s Apostle (sallallaahu `alayhi wasallam) disapproved the killing of women and children.
Volume 4, Book 52, Number 258 :
Narrated by Ibn ‘Umar (radiallaahu `anhu)
During some of the Ghazawat of Allah’s Apostle (sallallaahu `alayhi wasallam) a woman was found killed, so Allah’s Apostle (sallallaahu `alayhi wasallam) forbade the killing of women and children.
Number 256 and the two narrations below it seem to be contradicting each other, but that’s not the case. The latter two describe the rule, and Number 256 is the exception.
Those who are not generally engaged in fighting – like women, children, the elderly, the handicapped, and others who do not participate in the fighting – are not to be killed. The only exception to this is where such people participate directly in the fighting or are so intermixed with the fighters that it is impossible to separate them from those who are fighting.
The hadîth in question actually shows us that the general rule is not to kill non-combatants, even when they are present on the battlefield. The only exception is when the non-combatants are so mixed in with the fighters that it is impossible to fight against the combatants without the possibility of some non-combatants inadvertently being killed. This is only out of dire necessity.
Ibn Hajar writes in his commentary on this hadîth in Fath al-Bârî (6/146):
His statement “They are of them” means that they are construed as such under those circumstances. It does not mean that it is permissible to deliberately target them.
It is a matter of agreement among scholars that a person’s unbelief is not reason for that person to be killed. There is considerable evidence for this. Aside from the Prophet’s prohibition of killing non-combatants, we have where Allah says: “Let there be no compulsion in religion.” [Sûrah al-Baqarah: 256]