Burayda reported,

Whenever the Messenger of Allah ﷺ appointed a commander over an army or a raiding party, he would personally instruct him to be mindful of Allah and to treat the Muslims with him well. Then he would say, "Fight in the name of Allah and in the path of Allah. Fight those who disbelieve in Allah. Go to battle, but do not act treacherously with the spoils, do not break your pledges, do not mutilate the dead, and do not kill a child…"

Azami 11970

Sahih

عن بريدة قال

كان رسول الله ﷺ إذا أمر أميرا على جيش، أو سرية أوصاه في خاصته بتقوى الله ومن معه من المسلمين خيرا، ثم قال: اغزوا باسم الله في سبيل الله، قاتلوا من كفر بالله، اغزوا، ولا تغلوا، ولا تغدروا، ولا تمثلوا، ولا تقتلوا وليدا…

الأعظمي 11970صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "Their homes and were harmed in My cause and fought and were killed, I will surely remove from them their misdeeds and admit them to gardens beneath which rivers flow"
Numbering
Jami al-Kamil 11970 (2nd edition)
Azami 11970