When the people encamped, (the narrator Amr ibn Uthman al-Himsi) said: When the Messenger of Allah ﷺ encamped, the people scattered in the glens and wadis. The Messenger of Allah ﷺ said: Your scattering in these glens and wadis is only of the devil. They afterwards kept close together when they encamped to such an extent that it used to be said that if a cloth were spread over them, it would cover them all. (Using translation from Abū Dāʾūd 2628)
كَانَ النَّاسُ إِذَا نَزَلَ رَسُولُ اللهِ ﷺ مَنْزِلًا تَفَرَّقُوا فِي الشِّعَابِ وَالْأَوْدِيَةِ فَقَالَ رَسُولُ اللهِ ﷺ إِنَّ تَفَرُّقَكُمْ فِي هَذِهِ الشِّعَابِ وَالْأَوْدِيَةِ إِنَّمَا ذَلِكُمْ مِنَ الشَّيْطَانِ فَلَمْ يَنْزِلُوا بَعْدَ ذَلِكَ مَنْزِلًا إِلَّا انْضَمَّ بَعْضُهُمْ إِلَى بَعْضٍ حَتَّى يُقَالَ لَوْ بُسِطَ عَلَيْهِمْ ثَوْبٌ لَعَمَّهُمْ