Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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!

share|improve this question

migrated from stackoverflow.com Feb 27 '12 at 22:04

This question came from our site for professional and enthusiast programmers.

5 Answers 5

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.

share|improve this answer
    
Thanks for the help! –  Orpheus Mercury Feb 28 '12 at 3:29

When you build a project, it's always good to keep a history of what happened in the past. Say you need to check a file revision with 4 months ago.

Git is the source control that maintains these revisions.

share|improve this answer

It is a version control system, and well, it manages the versioning of your project ( files). It basically helps you to go back or track the changes to your code as you develop. You can freely do changes, knowing that you can easily see what changes you have done or revert back to a previous version etc. Of course version control and Git are not just about that, but that's the basics. There is rarely a case when you should not check that box and create one.

Read up more on version control, the need for it and then about Git and you will be set.

share|improve this answer
    
I found that this is the answer that DIRECTLY answers the question "what circumstances" best. –  junky Feb 28 '12 at 3:34
  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
share|improve this answer

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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