Regarding the pilgrimage of the Prophet ﷺ, he reported to us that the Messenger of Allah ﷺ set out when five nights remained of Dhu al-Qadah, and we set out with him. When he reached Dhu al-Hulayfah, Asma bint Umays gave birth to Muhammad bin Abu Bakr. She sent word to the Messenger of Allah ﷺ asking, "What should I do?"He replied, "Bathe, fasten a cloth tightly around yourself, and then enter the state of ihram."
أخبرنا عمرو بن علي ومحمد بن المثنى ويعقوب بن إبراهيم واللفظ له قالوا حدثنا يحيى بن سعيد قال حدثنا جعفر بن محمد قال حدثني أبي قال أتينا
عن حجة النبي ﷺ فحدثنا أن رسول الله ﷺ خرج لخمس بقين من ذي القعدة وخرجنا معه حتى إذا أتى ذا الحليفة ولدت أسماء بنت عميس محمد بن أبي بكر فأرسلت إلى رسول الله ﷺ كيف أصنع قال اغتسلي واستثفري ثم أهلي
[Its isnad is sahih]This is also found in Al-Kubra, hadith 284, and its original version is in Sahih Muslim, Hajj, chapter on the Prophet's Hajj, hadith 1218, narrated from Jafar bin Muhammad through the same chain, at greater length.