Allah (SWT) say:
وَالَّذِي خَلَقَ الْأَزْوَاجَ كُلَّهَا وَجَعَلَ لَكُمْ مِنَ الْفُلْكِ وَالْأَنْعَامِ مَا تَرْكَبُونَ
لِتَسْتَوُوا عَلَىٰ ظُهُورِهِ ثُمَّ تَذْكُرُوا نِعْمَةَ رَبِّكُمْ إِذَا اسْتَوَيْتُمْ عَلَيْهِ وَتَقُولُوا سُبْحَانَ الَّذِي سَخَّرَ لَنَا هَٰذَا وَمَا كُنَّا لَهُ مُقْرِنِينَ
وَإِنَّا إِلَىٰ رَبِّنَا لَمُنْقَلِبُونَ
And who created the species, all of them, and has made for you of ships and animals those which you mount.
That you may settle yourselves upon their backs and then remember the favour of your Lord when you have settled upon them and say. "Exalted is He who has subjected this to us, and we could not have [otherwise] subdued it.
And indeed we, to our Lord, will [surely] return."
(Qur'an 43: 12-14)
Ali bin Rabi’ah (RA) said:
“I witnessed Ali having an animal brought to him to ride. When he placed his foot in the stirrup he said:
بِسْمِ ٱللَّٰ (Bismillah - In the Name of Allah) three times.
Then once he had ascended upon its back, he said:
وَالْحَمْدُ لِلَّهِ (Al-ḥamdulillāh - All praise is due to Allah) then he said:
سُبْحَانَ الَّذِيْ سَخَّرَ لَناَ هَذَا وَمَا كُنَّا لَهُ مُقرِنِيْنَ وإِنَّا إِلَى رَبِّناَ لمُنْقَلِبُوْنَ
(Subḥān alladhī sakh-khara lanā hādhā wa mā kunnā lahū muqrinīn. Wa innā ilā rabbinā lamunqalibūn)
(Glory is to Him Who has subjected this to us, and we were not able to do it. And, surely, to our Lord are we returning)
Then he said:
الْحَمْدُ لِلَّهِ ، الْحَمْدُ لِلَّهِ ، الْحَمْدُ لِلَّ (Al-ḥamdulillāh - All praise is due to Allah) (three times)
اللهُ أَكْبَرُ ، اللهُ أَكْبَرُ ، اللهُ أَكْبَرُ (Allāhu Akbar - Allah is the Greatest) (three times)
Then he said:
سُبْحَانكَ الَّلُهمَّ إِنِّيْ ظَلَمْتُ نَفْسِيْ فَاغْفِرْلِيْ فَإِنَّهُ لاَ يَغْفِرُ الذُّنوْبَ إِلاَّ أَنتَ
(Subḥānaka-allahumma inni ẓalamtu nafsī faghfirlī fa-innahū lā yaghfirudh-dhunūba illā ant)
(Glory is to You, indeed I have wronged myself, so forgive me, for indeed none forgives sins except You)
Then he laughed. So I said: ‘O Commander of the Believer! What caused you to laugh?’ He said: ‘I saw the Messenger of Allah do as I did, then he (RA) laughed, so I said, ‘What causes you to laugh?’ He said: ‘Indeed, your Lord is very pleased with His worshipper when he says: “O my Lord, forgive me my sins, indeed, no one other than You forgives sins.”