Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6384337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:45:49+00:00 2026-05-25T02:45:49+00:00

in Xcode 4 how to associate a project to the local Git repository I

  • 0

in Xcode 4 how to associate a project to the local Git repository I set up?

That is:

  • I’ve set up a Git repository after the Xcode 4 project was already created, based on instructions here:
  • I’ve gone to Organizer and “added” this as a local Git repository
  • When I go to my project in Xcode 4 the source code functions still don’t appear to work – I’m guessing it because there must be some way of tying the Xcode Project wiht the local repository I created?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:45:50+00:00Added an answer on May 25, 2026 at 2:45 am

    From “How to Create Git Repos for Existing Xcode Projects“:

    UPDATE: Apparently just initializing an empty repository in the project directory is enough; Xcode autodetects it for you.
    It be nice if something to that effect was in the documentation. Thanks to Jason for that (details here). Open the project directory in a terminal and type the following:

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

    So in your case, it should detect it.

    The OP Greg comments:

    I found out that all I had to do was change a file, and then the Xcode 4 pop up menu for the file did show a source control set of options (previously greyed out).
    So the initial part of the answer is correct re the manual git commands for creating the git repository.


    Otherwise you can try:

    • make a new XCode4 project with a(n empty) git repo in it
    • move your .git directory and override the Xcode 4 project .git
    • move the sources in that new Xcode 4 project directory
    • see if XCode4 then detect your sources and the Git integration

    Not your case probably, but one of the comments mentions:

    If you’re switching from an SVN repository (which I was), the trick is to go into your project folder and delete or rename the .svn directory.
    For me it seemed that Xcode would find the .svn folder first (or preferred it, even though the backing repository was decommissioned), but once it was gone Xcode would happily start using the git repository.

    That was actually the issue for another Xcode 4 Git user here on SO.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .plist file that is loaded into my Xcode project. I have
In Xcode is it possible to build a clean version of my project and
Xcode question here: If I'm programming in C++ or objective-C, and I #include or
I'm working with xcode and I have classes associated with other projects that I
Just starting out with an iPhone application using xcode 4.2. I understand that it
I have a NSManagedObject subclass, created by the XCode model interface. This class has
Xcode looked at this line and did not complain. Project built, code crashed at
I have installed xcode on my mac but I am annoyed that I have
I want to connect a table that i have created in SQL Developer to
Xcode 4 has a very nice built-in help/documentation that you can access e.g. by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.