Create a git repository from an existing XCode project

Create a git repository from an existing XCode project

The following steps can be followed to create a Git repository from an existing XCode project.

  1. Open the terminal and navigate to the directory containing your XCode project.
  2. Execute the following commands to create a local Git repository:
    > git init
    > git add .
  3. Open your project using XCode.
  4. Navigate to the menu “Source control” > “your project” > “Configure”.
  5.  Open the “Remotes” tab as shown in the following screenshot.
    git step 3
  6. Click on the + button.
  7. Add the remote repository indicating its remote address.
    git step 4
    git step 4 b
  8. Now that the remote repository has been configured, we can commit the project. Navigate to “Source control” > “Commit”. You can check the “Push to remote” option or we can do it in two different steps. Click on the Commit button.
    git step 5
  9. Push the local commit to the remote repository. Navigate to “Source control” > “Push”.
    git step 6
    git step 6 b
Share Button


Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload the CAPTCHA.