Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I'm a beginning developer setting up a project in Xcode 4.3 and I'm wondering under what circumstances I would need to check the "Create local git repository for this project" box.

Thank you!


migration rejected from Oct 20 at 8:51

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as too broad by MichaelT, durron597, Ixrec, Snowman, Kilian Foth Oct 20 at 8:51

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers 3

up vote 14 down vote accepted

Git is a version control system. It's useful for a number of reasons:

  • It stores old versions of files, so you can always look up old versions. This also removes the need to leave useless code commented out and getting in the way.
  • It makes it easy to share code with other people (they can "clone" your repository and work on it, and then share the changes back with you).
  • You can get free hosting for your project, so you can access the code anywhere.
  • Since you have old versions available, you can mess around with the code as much as you want, safe in the knowledge that you can "revert" back to a previous version instantly if you change your mind.

I can't imagine working on a project without version control, so I'd recommend learning how to use it.

Thanks for the help! – Orpheus Mercury Feb 28 '12 at 3:29
  1. You can view past changes to a file easily within Xcode
  2. If you plan on allowing multiple users to work on the project, you can keep a history of your changes for when they arrive
  3. You can easily create branches to add new experimental features without touching the main version

Since everyone else has described what git is I can give you some more motivation on why to use it:

  1. Git is fast
  2. Git is small
  3. You can use any workflow you want (subversion style etc)
  4. Github is awesome for finding useful code and cloning it
  5. Easy to learn
  6. So much better than copying files via FTP
  7. Flexible
  8. You can use staging area (you can setup what you want your commit to look like before you commit it.)
  9. It's cheap (free) and can be used locally
  10. A lot of people are using it

Not the answer you're looking for? Browse other questions tagged or ask your own question.