Sayyiduna Abdullah bin Abbas (may Allah be pleased with them) narrates that when the Messenger of Allah (ﷺ) set out for the conquest of Makkah during Ramadan, he kept the fast until he reached a place called Kudayd, whereupon the people broke their fast. The noble Companions (may Allah be pleased with them) used to follow every new command of the Messenger of Allah (ﷺ) (i.e., when the Messenger of Allah (ﷺ) said to break the fast, they acted upon it).
Hadith Referenceالسنن المأثورة / باب صيام من أصبح جنبا / 308
Hadith Takhrijصحیح بخاری، الصوم، باب اذا صام اماماً من رمضان ثم سافر، رقم : 1944 ، صحيح مسلم، الصیام باب جواز الصوم والفطر في شهر ..... الخ، رقم : 1113