UPDATE 20141013: added build hash so it looks like "1.0.2 (E3B8)"; added swift version
IMPORTANT: I'm still trying to figure out the best practice of this topic, thus the approach I described in this article may not be final.
Long story short:
1. Add a Run Script in Build Phases (Editor -> Add Build Phase), and put it before "Copy Bundle Resources" so that we can increase version number in info.plist, and then copy plist into app bundle.
2. Add script as below. The magic here is "git rev-list HEAD | wc -l | tr -d ' '" which gives you the subversion-style revision number, which means if you're not in master branch this doesn't make any sense (that's why I said I'm still figuring it out). Basically I don't mind change version number in debug mode but you may want to uncomment the 2nd line if you stay in develop branch most of the time.
-- swift version --
label_version.text = NSBundle.mainBundle().infoDictionary?["CFBundleVersion"] as? String