Andrew Tuzson
Andrew Tuzson

Reputation: 639

Cannot create git repository using Xcode 9

I have created a project that I would like to push to my GitHub account. Unfortunately, I did not create a GitHub repository when creating the project. When I attempt to create a repository using Xcode by following the path of Source Control -> Create Git Repository, Xcode displays a popup stating that "all projects are already under source control." This is not the case and the project is not in my GitHub account. Here is a screen cap of the error. What am I missing?

Source Code Error

Upvotes: 1

Views: 7248

Answers (1)

Yitzchak
Yitzchak

Reputation: 3416

Your project is under source control.. As you can see the files marked with letters "R" (for Renamed) and "M" (for Modified) and "A" (for Added)

By default Xcode creates a local git repository for new project unless you uncheck that option

Check this out

Xcode will automatically add it under source control.

You just need to define a remote. Right click on the repository (from the git pane) and tap on "Add existing remote.."

Upvotes: 3

Related Questions