2.38 Thus, knowing the self to be eternal, different from the body and untouched by all corporeal alities, remaining unaffected by pleasure and pain resulting from the weapon-strokes etc., inevitable in a war, as also by gain and loss of wealth, victory and defeat, and keeping yourself free from attachment to heaven and such other frutis, begin the battle considering  it merely as your own duty. Thus, you will incur no sin. Here sin means transmigratory existence which is misery. The purport is that you will be liberarted from the bondage of transmigratory existence.

Thus, after teaching the knowledge of the real nature of the self, Sri Krsna begins to expound the Yoga of work, which, when preceded by it (i.e., knowledge of the self), constitutes the means for liberation.