Dont crack your knuckles....a bad habit that I only did for a few months in my teens but its not good for the joints...
I get a sore hand when using the bar chords too much...check with your doctor...
My friend a few years back would continually write, "Don't Crack" on his hand everyday. He said his nervous habit of cracking his knuckles was so bad that he used every method he could to remind himself. He never cracks anymore and needs no reminder. I unfortunatly have picked up his hobby and it's quite hard to stop.
What did your doctor have to say about the sore hands after guitar playing? Mine too is set by playing barr chords, particularly using the four fingers at once with the thumb wrapped round back.