简体   繁体   中英

Adding Git Repository to XCode project after creation

My question is quite simple. I have an XCode project, and I did not select the "create git repository" option. I would like to use Git within XCode, because it seems like Apple simplified the process of using Git within XCode so I don't have to deal with the command line tool.

However, I don't see any option to add a git repository. The "source control" menu is all grayed-out. Surely there is a way to add one?

It wouldn't really make sense to me that I couldn't add one now - this would seem like a huge hole in the features of XCode.

I agree with you are assumption. This feature is missing.

But you can do it from the shell following this instructions

http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository

Do it in the main directory of your project.

Basically you need to run this line

$ git init

And your git local rep is ready. Use xCode from now on

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM