1

hello I want to ask something when we create new Xcode project then I forgot to enable button Create git repository on my mac then how to enable this and how to add my code on SVN....for git is use ?

Wain
  • 118,658
  • 15
  • 128
  • 151
Rahul Sharma
  • 940
  • 2
  • 12
  • 31

1 Answers1

1

Open terminal and cd into the directory containing the .xcodeproj file

1.git init

2 In finder enter the newly created .git folder (in the same directory as the .xcodeproj file). Find info/exclude, open and add these lines, .DS_Store and xcuserdata/ Not sure if this is needed, but I used terminal to cp info/exclude over to a .gitignore file

3.git add .

4.git commit -m "Initial commit"

5.Now to get XCode to actually see the repo. In the project organizer, you first have to delete the project from the Projects tab. Then simply re-open the project to get it back. This will detect the GIT repository just created

In the repositories tab of the organizer I then branch off the master branch/switch into whatever version I'm working on.

Gajendra Rawat
  • 3,673
  • 2
  • 19
  • 36