Burayda bin Husayb reported,

Whenever the Messenger of Allah ﷺ appointed a commander over an army or a raiding party, he would personally enjoin him to fear Allah and to treat the Muslims with him well. Then he would say,"Fight in the name of Allah and in the cause of Allah. Fight those who disbelieve in Allah. Go to battle, but do not steal from the spoils, do not break your covenants, do not mutilate the dead, and do not kill children.When you meet your enemy from among the polytheists, call them to three options. Whichever of them they accept, accept it from them and refrain from fighting them.First, call them to Islam. If they accept, accept it from them and refrain from fighting them. Then call them to move from their land to the land of the Muhajirun, and inform them that if they do so, they will have the same rights as the Muhajirun and the same duties. If they refuse to move from their land, inform them that they will be treated like the Bedouin Muslims, with the same ruling of Allah applying to them as applies to the believers, but they will have no share in the war spoils or fay unless they fight alongside the Muslims.If they refuse, then ask them to pay the jizyah. If they accept, accept it from them and refrain from fighting them. If they refuse, then seek help from Allah and fight them.When you besiege a fortress and they ask you to grant them the protection of Allah and His Prophet, do not grant them the protection of Allah or His Prophet. Instead, grant them your own protection and the protection of your companions, for it is a lesser matter if you break your protection and that of your companions than to break the protection of Allah and His Messenger.When you besiege a fortress and they ask you to let them surrender according to Allah's judgment, do not let them surrender according to Allah's judgment. Instead, let them surrender according to your own judgment, for you do not know whether you will arrive at Allah's true judgment regarding them or not."

Azami 7842

Sahih

عن بريدة بن الحصيب قال

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

الأعظمي 7842صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Rulings on jihad and its etiquette
Section
Imam appoints a commander over the army and advises him
Numbering
Jami al-Kamil 7842 (2nd edition)
Azami 7842