Abu Bakr bin Abdur Rahman (may Allah have mercy on him) narrates from some companions of the Messenger of Allah (ﷺ) that the Messenger of Allah (ﷺ) commanded the people during the journey of the conquest of Makkah to break their fast so that they would have strength to face the enemy, but the Messenger of Allah (ﷺ) kept his fast. Abu Bakr (may Allah have mercy on him) says that the one who narrated this hadith to me said: I saw the Messenger of Allah (ﷺ) at the place of ‘Arj pouring water over his head due to the severity of thirst or the intensity of heat. Then the Messenger of Allah (ﷺ) was informed: “You (ﷺ) have kept your fast, so a group has not yet broken their fast.” So when the Messenger of Allah (ﷺ) reached Kudayd, he called for a bowl of water and drank it (in front of the people), so all the people broke their fast.
Hadith Referenceالسنن المأثورة / باب صيام من أصبح جنبا / 309
Hadith Takhrijسنن ابی داؤد، الصوم، باب الصائم يصب عليه الماء من العطش و يبالغ في الاستنشاق ، رقم : 2365 وقال الالبانی: صحيح ، مسند احمد : 241/25، رقم : 15903 وقال الارنوؤط: اسناده صحيح على شرط مسلم