AndyD273 AndyD273 - 1 year ago 116
Git Question

Using Git with an existing XCode project

I am trying to figure out how to use git in my project workflow, and I have an existing XCode project that I want to put into the repository. I think I have the repository set up correctly under organizer, but the Source Control menu is grayed out.

Apparently, it's easy to do if you start a new project, but how do I import an existing project with snapshots and everything?

I'm using XCode 4 and git 1.7.4

Also, if there are any good walkthroughs on git configuration and best practices, that would be nice. I'm a little late to the game, so anything that can get me up to speed would be cool.

Answer Source

GitHub has some very good git tutorials at

to do the initial setup of a repository, open up a terminal window, and CD to the project directory. once there, type

git init
git add .
git commit -m "Initial commit"

Restart Xcode. The repository should now be set up, and you will be able to manage it in xcode 4.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download