Salama bin Akwa reported,

I gave my pledge of allegiance to the Prophet ﷺ, then I moved aside to the shade of the tree. When the crowd had thinned out, he said, "Ibn al-Akwa, will you not pledge allegiance?"I replied, "I have already pledged, Messenger of Allah."He said, "Do so again." So I pledged to him a second time.I asked him, "Abu Muslim, what were you pledging upon that day?"He answered, "Upon death."

Azami 7839

Sahih

عن سلمة بن الأكوع قال

بايعت النبي ﷺ، ثم عدلت إلى ظل الشجرة، فلما خف الناس، قال: يا ابن الأكوع، ألا تبايع؟ قال: قلت: قد بايعت يا رسول الله. قال: وأيضا فبايعته الثانية. فقلت له: يا أبا مسلم على أي شيء كنتم تبايعون يومئذ؟ قال: على الموت.

الأعظمي 7839صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Rulings on jihad and its etiquette
Section
Pledging allegiance to the leader of the army before fighting
Numbering
Jami al-Kamil 7839 (2nd edition)
Azami 7839