Since Xcode at version 4.4.1 doesn’t have a switch branch or checkout older version function, is it possible to do that in bash
git checkout in-app-purchase-to-be-added
or
git checkout HEAD^2
because all the source code (.m, .h), .xib, and project files, image resources will all change in a blink of an eye, so won’t it cause weird behavior in Xcode? Right now I always quit Xcode, switch branch, and restart Xcode, but maybe there is a faster way.
XCode should have a way to switch branch, as described in “Using branches and git with Xcode 4.1“
See also “Git Branch Management With Xcode“
For more complex branch switching/creation, yes, you might have to to it through the command-line:
So closing/re-opening XCode might not always be needed, depending on the nature of your project.