Sahih
Al Bukhari
صحيح البخاري
Fighting for the Cause of Allah (Jihaad)
كتاب الجهاد والسير
Chapter 110: To give a Bai'a for not to flee during a battle
باب الْبَيْعَةِ فِي الْحَرْبِ أَنْ لاَ يَفِرُّوا
Sahih Al Bukhari 2958
Narrated Ibn `Umar
When we reached (Hudaibiya) in the next year (of the treaty of Hudaibiya), not even two men amongst us agreed unanimously as to which was the tree under which we had given the pledge of allegiance, and that was out of Allah's Mercy. (The sub narrator asked Naf'i, "For what did the Prophet (ﷺ) take their pledge of allegiance, was it for death?" Naf'i replied "No, but he took their pledge of allegiance for patience.")
حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا جُوَيْرِيَةُ، عَنْ نَافِعٍ، قَالَ قَالَ ابْنُ عُمَرَ ـ رضى الله عنهما ـ رَجَعْنَا مِنَ الْعَامِ الْمُقْبِلِ فَمَا اجْتَمَعَ مِنَّا اثْنَانِ عَلَى الشَّجَرَةِ الَّتِي بَايَعْنَا تَحْتَهَا، كَانَتْ رَحْمَةً مِنَ اللَّهِ. فَسَأَلْتُ نَافِعًا عَلَى أَىِّ شَىْءٍ بَايَعَهُمْ عَلَى الْمَوْتِ قَالَ لاَ، بَايَعَهُمْ عَلَى الصَّبْرِ.