From Sahih Muslim (Hadith 6711):
Anas reported that a person said to Allah's Messenger (ﷺ):When would be the Last Hour? He (the Holy Prophet) said: What preparation have you made for that? And he gave no details, but said: I love Allah and His Messenger. Thereupon he (the Holy Prophet) said: You would be along with one whom you love. Anas b. Malik reported through another chain of transmitters that a desert Arab came to Allah's Messenger (may peace be upon, him), the rest of the hadith is the same but with this variation that he said: I have not made much preparations which merit appreciation for myself
Reference: Muslim 6711