"Better is one's own duty, though ill done, than the duty of another, though well-performed."
Going deeper
The same Sanskrit words open 3.35 and 18.47: better is one's own duty, though ill done, than the duty of another, though well performed. After those words the verses part. In chapter 3 Kṛṣṇa goes on to say that it is better to die while performing one's own duty, and that the duty of another is full of fear. In chapter 18 he goes on to say that one who does the duty ordained by their own nature incurs no stain. The setting there is the division of duties in 18.41, according to the guṇas born of nature. 18.45 says that devoting oneself to one's duty, one attains perfection, and 18.46 says one reaches it by worshipping, with one's own duty, him from whom all beings arise. 18.48 adds that one should not give up one's work though it is imperfect, for all endeavours are enveloped by imperfections as fire is by smoke. See what the Gītā says about dharma.