The Prophet ﷺ left Medina (for Mecca) in the company of ten-thousand (Muslim warriors) in (the month of) Ramadan, and that was eight and a half years after his migration to Medina. He and the Muslims who were with him, proceeded on their way to Mecca. He was fasting and they were fasting, but when they reached a place called Al-Kadid which was a place of water between 'Usfan and Kudaid, he broke his fast and so did they. (Az-Zuhri said, "One should take the last action of Messenger of Allah ﷺ and leave his early action (while taking a verdict.")
أَنَّ النَّبِيَّ ﷺ خَرَجَ فِي رَمَضَانَ مِنَ الْمَدِينَةِ وَمَعَهُ عَشَرَةُ آلاَفٍ وَذَلِكَ عَلَى رَأْسِ ثَمَانِ سِنِينَ وَنِصْفٍ مِنْ مَقْدَمِهِ الْمَدِينَةَ فَسَارَ هُوَ وَمَنْ مَعَهُ مِنَ الْمُسْلِمِينَ إِلَى مَكَّةَ يَصُومُ وَيَصُومُونَ حَتَّى بَلَغَ الْكَدِيدَ وَهْوَ مَاءٌ بَيْنَ عُسْفَانَ وَقُدَيْدٍ أَفْطَرَ وَأَفْطَرُوا قَالَ الزُّهْرِيُّ وَإِنَّمَا يُؤْخَذُ مِنْ أَمْرِ رَسُولِ اللَّهِ ﷺ الآخِرُ فَالآخِرُ