Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:4:71

O you who have believed, take your precaution and ˹either˺ go forth in companies or go forth all together.  

O you who believe, take your precautions, against your enemy, that is, be wary of him and be vigilant against him; then move forward, prepare to fight him, in companies, in separate groups, one raiding party followed by the next; or move forward all together, in one assembly.
القرآن:٤:٧١

يَا أَيُّهَا الَّذِينَ آمَنُوا خُذُوا حِذْرَكُمْ فَانْفِرُوا ثُبَاتٍ أَوِ انْفِرُوا جَمِيعًا  

{يا أيها الذين آمنوا خذوا حذركم} من عدوكم أي احترزوا منه وتيقظوا له {فانفروا} انهضوا إلى قتاله {ثُبَاتٍ} متفرقين سرية بعد أخرى {أو انفروا جميعا} مجتمعين.