Answer is a big No. You will get what you have given. One cannot counteract bad karma by performing good ones. Karma means action. Yes, one may counteract bad karma by performing acts that will nullify the effects of a previous action, but the unexperienced result of an action will last forever, until it is experienced.
But it’s important to note that aside from the deed itself, the state of consciousness that prompts any action is what we must consider. A person who steals from another may get some merit by returning the item to the victim if the thief does so because he fears the bad karma of going to jail. But what will further his journey to moksha will be the development of pure compassion, and the sense of not wishing to bring pain to any other being.
One who, for example, steals bread from a wealthy, well-fed man to feed a starving family (and is pained to do it) may not suffer the same karmic effect as someone who steals purely out of greed.
Before becoming Sage Valmiki he (had name Ratnakar) murdered and robbed people for his living. Upon Sage Narad’s advice he did penance by meditating on Bhagwan Ram’s name. He evolved as a Sage and then wrote Ramayan.
.
Bramhavaivarta Purana, Prikriti 37.16:
Avashyam eva bhoktavyam krutakarma shubha ashubam |
Naa bhuktam kshiyate karma kalpa-koti-shaitairapi”||
(A person will definitely enjoy the fruits of his action; it may be good or bad; for without giving the results, an action does not die out even after billions of years.)
.
Contributor: Fred Stella
Location of this file (10h): https://www.hinduspeakers.org/ufaqs/can-you-wash-off-bad-karma-by-good-ones/