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 ?
            Asked
            
        
        
            Active
            
        
            Viewed 2,381 times
        
    1
            
            
        - 
                    Your code is currently in SVN and you want to migrate to GIT? – Wain Oct 18 '13 at 11:32
- 
                    yes I want to enable git – Rahul Sharma Oct 18 '13 at 11:36
1 Answers
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
- 
                    Actually I don't know how to run terminal then from point 3 can you explain .... – Rahul Sharma Oct 18 '13 at 11:50
- 
                    go to Spotlight upper right corner of the desktop search terminal and click it..:) – Gajendra Rawat Oct 18 '13 at 11:58
- 
                    I know I run terminal then direct drag my project folder then ..... – Rahul Sharma Oct 18 '13 at 12:14
- 
                    Terminal Shows :Last login: Fri Oct 18 17:17:57 on ttys001 CC-DEV11:~ rahulsharma$ /Users/rahulsharma/Desktop/HIS_Project/HISWebService\ 11_oct -bash: /Users/rahulsharma/Desktop/HIS_Project/HISWebService 11_oct: is a directory CC-DEV11:~ rahulsharma$ – Rahul Sharma Oct 18 '13 at 12:15
- 
                    UserInterfaceState.xcuserstate this flie not found in my project folder – Rahul Sharma Oct 18 '13 at 12:17
- 
                    
- 
                    I am in directory containing the .xcodeproj file, now for git init, it says git command not found – Rahul Sharma Oct 18 '13 at 12:56
- 
                    
- 
                    For 'git command not found' error - install command line tools (Xcode > Preferences > Downloads tab). – Ashok Oct 19 '13 at 07:16
 
    