Sahih al-Bukhari, Book 56, Hadith 266 (Bukhari 2935)

Narrated Ibn `Abbas:

A man came to the Prophet (ﷺ) and said, "O Allah's Messenger (ﷺ)! I have enlisted in the army for such-andsuch Ghazwa, and my wife is leaving for Hajj." Allah's Messenger (ﷺ) said, "Go back and perform Hajj with your wife."