While most people I know with severe RSIs have stories that resemble mine in ways, please don't conclude that heroically stupid bouts of overtime are the only way to injure yourself. It can also be done slowly and steadily. While I suggest the actions below, an attitude is of primary importance. You must be willing to be kind to yourself, and to make your health and well-being a priority. It may not be sufficient, but it's necessary, and nothing below will help you without it.
People tend to place in undue emphasis on ergonomics.
Certainly, bad ergonomics are much worse than good ergonomics, but neither will save you from injury if your work habits are bad. The single most important action you can take is to take regular breaks. I take five minutes every half-hour. At an absolute minimum, take five minutes every hour. Set an alarm, and get up when it goes off.