tasmaatsarveshu kaaleshu maamanusmara yudhya cha |
mayyarpitamanobuddhirmaamevaishyasyasamshayam || 7 ||

Therefore, remember me at all times and fight. One who offers his mind and intellect to me attains me only, without a doubt.
tasmaat : therefore
sarveshu : all
kaaleshu : times
maam : me
anusmara : remember
yudhya : fight
cha : and
mayi : to me
arpita : offer
manaha : mind
buddhihi : intellect
maam : me
eva : only
eshyasi : attains
asamshayam : without a doubt
Shri Krishna gives the ultimate teaching to all of mankind in this shloka. Since the thought at the time of death determines our fate after death, and the thought of death is an outcome of our lifelong thinking, Shri Krishna instructs us to remember Ishvara at all times and perform our duties.
Let us examine this instruction further. We are not asked to give up our duties, retire to a forest and constantly think of Ishvara there. Shri Krishna wants us to first remember Ishvara, and then perform duty consistent with our svadharma. The result of leading such a life is that we will attain Ishvara certainly. There is no doubt in this matter.
With this instruction, meditation takes on a whole new dimension. Typically, we confine meditation to something that we do for fifteen to thirty minutes, sitting in a solitary place as instructed in the sixth chapter. We now realize that those instructions were meant to prepare us for the kind of meditation that Shri Krishna wants us to pursue: 24/7 meditation of Ishvara.
How can this be possible? Our mind can only think of one thought at a time. So the way to meditate continuously is to somehow understand that everything we see, do and know is Ishvara.
Now we understand why Shri Krishna defined the terms brahma, karma, adhibhuta, adhideva, adhyaatma, adhiyagnya at the beginning of the chapter, because all those are nothing but Ishvara. If, while performing any action, we know that the actor, the action, the instrument, the process and the result – everything is Ishvara – we will never forget Ishvara.
Even if this kind of thinking is not possible for us in the beginning, we can emulate the mind of a mother who, regardless of what she is doing, always thinks about her child in the background. By practising meditation on our favourite deity we develop an attachment to it, so that we can recall it every time we feel distant from Ishvara.
So therefore, by practicing meditation constantly on Ishvara, we should strive to change our thinking such that our final thought will be nothing but Ishvara. This constant meditation upon Ishvara is called upaasanaa.