That’s a serious and common problem in the industry, and you should consider some steps to take.
- Take a long(ish) break. I mean days, or even weeks. During this break do something delicate with your hands, like some creative stuff. Anything that requires you fingers moving and doesn’t involve pressing a lot of keys. Your joints need some motion to get back in business.
- When you are done with 1. or if you can’t afford it, install some software that forces you to take short breaks during your work. One might argue this will “remove you from The Flow” but the flow is overrated if it’s about your health; your health is above all else. I personally recommend WorkRave (also, the project needs some serious love on many fronts, if you need some F/LOSS projects to contribute to).
- Drink a lot of water. This is probably the most important on the long term. Not coffee, not soda, not energy drinks. Plain, unflavoured, non-fizzing water. Your whole body, joints included, need it.
- Do some excercises. You don’t have to do heavy lifting nor anything really serious. Even long walks would do. Just move your body. You can do some small excercises during your short breaks mentioned in 2. In fact, WorkRave helps you with that, too.
Take care of yourself. You can churn a huge amount of good quality code out of yourself if you have to stop working altogether due to health issues.