From Abu Salamah, from Jabir bin Abdullah about the statement of Allah, most High: Allah was pleased with the believers when they gave the pledge to you under the tree (48:18). that Jabir said: "We pledged to the Messenger of Allah ﷺ that we would not flee, and we did not pledge to him for death." [He said:] There are narration on this topic from Salamah bin Al-Akwa', Ibn 'Umar, 'Ubadah, and Jarir bin 'Abdullah.
فِي قَوْلِهِ تَعَالَى (لَقَدْ رَضِيَ اللَّهُ عَنِ الْمُؤْمِنِينَ إِذْ يُبَايِعُونَكَ تَحْتَ الشَّجَرَةِ ) قَالَ جَابِرٌ بَايَعْنَا رَسُولَ اللَّهِ ﷺ عَلَى أَنْ لاَ نَفِرَّ وَلَمْ نُبَايِعْهُ عَلَى الْمَوْتِ قَالَ وَفِي الْبَابِ عَنْ سَلَمَةَ بْنِ الأَكْوَعِ وَابْنِ عُمَرَ وَعُبَادَةَ وَجَرِيرِ بْنِ عَبْدِ اللَّهِ