How do I migrate a flat svn repo to git repo?

GitHub: Am I meant to set up git in the same directory as my .xcodeproj file (and include that file) if I want to collaborate using a remote repo? If so, how come Xcode doesn't do that?

  • Does anyone have a 'standard operating procedure' for collaborating using Xcode and a remote repository? (I am confused by these answers: ; . )

  • Answer:

    You should set up git in whatever directory gets you version control on the project's files. There are many different ways of organizing a project so there's no single right answer. Generally though you want git controlling pretty much everything, so you initialize the repository at whatever directory is the top level for your project and your organizational system. As for Xcode I'm not sure what you mean. I just tried creating a project in Xcode and having it create the git repo. The Project.xcodeproj bundle and the .git directory are in the same directory.

Tom Harrington at Quora Visit the source

Was this solution helpful to you?

Other answers

You initialise you got in the highest directory that you want to put under source control.When I work with projects I tend to use the following format: ~/Projects/ProjectName/iOS/src/xxxx I initialise my git repo in the iOS folder. xxxx is where Xcode initialises my project.I like to use this structure as it allows me to create my repo at platform level as I quite frequent make multi platform projects. By keeping the project in a src directory, it quickly identified this folder to other developers as the directory that contain all of the source code. It also allows me to create additional folders in the iOS folder for things such as raw assets, documents, etc. So I can control all of these within the same repository.By  default Xcode will initialise git in the same directory that you choose to create your project (which will just so happen to be the same one as you xcodeproj file). Depending on the methodologies of your team this may be a preferred point to initialise it.

Matthew Cawley

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.