كتاب الحج
15  
The Book of Pilgrimage
(38)
Chapter: It is recommended to stay overnight in Dhu Tuwa when intending to enter Makkah, and to perform Ghusl before entering it, and to enter it by day
(38)
باب اسْتِحْبَابِ الْمَبِيتِ بِذِي طَوًى عِنْدَ إِرَادَةِ دُخُولِ مَكَّةَ وَالاِغْتِسَالِ لِدُخُولِهَا نَهَارًا
Sahih Muslim 1259 b

Nafi' reported that Ibn Umar (Allah be pleased with them) did not enter Mecca without spending the night at Dhi Tawu until it was dawn, when he took a bath, and then entered Mecca in the morning, and made a mention that Allah's Apostle (ﷺ) did that.

وَحَدَّثَنَا أَبُو الرَّبِيعِ الزَّهْرَانِيُّ، حَدَّثَنَا حَمَّادٌ، حَدَّثَنَا أَيُّوبُ، عَنْ نَافِعٍ، أَنَّ ابْنَ عُمَرَ، كَانَ لاَ يَقْدَمُ مَكَّةَ إِلاَّ بَاتَ بِذِي طَوًى حَتَّى يُصْبِحَ وَيَغْتَسِلَ ثُمَّ يَدْخُلُ مَكَّةَ نَهَارًا وَيَذْكُرُ عَنِ النَّبِيِّ صلى الله عليه وسلم أَنَّهُ فَعَلَهُ ‏.‏
Reference : Sahih Muslim 1259b
In-book reference : Book 15, Hadith 251
USC-MSA web (English) reference : Book 7, Hadith 2890
  (deprecated numbering scheme)