The Messenger of Allah ﷺ sent us with Khalid bin Walid to Yemen. Then he later sent Ali in his place and instructed him, "Tell Khalid's companions that whoever wishes to continue on with you may continue, and whoever wishes may return home."I was among those who continued on with him, and I gained a number of ounces of spoils.
بعثنا رسول الله ﷺ مع خالد بن الوليد إلى اليمن، قال: ثم بعث عليا بعد ذلك مكانه فقال: مر أصحاب خالد من شاء منهم أن يعقب معك فليعقب، ومن شاء فليقفل فكنت فيمن عقب معه، قال: فغنمت أواقي ذوات عدد.
Bukhari narrated it in Tawheed (4349) from Ahmad bin Uthman, who said, Shurayh bin Muslimah narrated to us, Ibrahim bin Yusuf bin Ishaq bin Abu Ishaq narrated to us, my father narrated to me, from Abu Ishaq, who said, I heard Bara, and he mentioned it. This was after the Prophet ﷺ returned from Taif and distributed the spoils at Jirana. Bukhari said, this was before the Farewell Pilgrimage. His statement, "that he should follow you," means that he should return to Yemen. Taqib means that part of the army returns after going back in order to join a raid the following day. This is what Khattabi said, as mentioned in Fath al-Bari (8/66).