In the modern age of agile with sprints and stories etc... it's easy to setup a bonus structure of complete x stories, finish x sprints, do x commits. But to do so is Just Bad Practice™.
I'd like to say I'm able to give you an easy system for how to incentivise your programmers, how to make sure they have a bonus to work towards. But there's no easy solution here.
Personally I dislike bonus structures and incentives that are solely based on my performance. I work as part of a team.
6/n