I am new to Xcode and coding in general. I am trying to resolve an issue with my CI in GitHub, which I think is coming from a path issue. To summarize my approach: I start by creating a GitHub repo, I then clone that to a outer folder (e.g., TEST) on my desktop, which results in desktop/TEST/TEST/[github files]. When I go to create my Xcode project, it always forces me to create a new folder resulting in desktop/TEST/TEST/TEST/[xcode files]. I want the Xcode files to sit in the repo folder so its desktop/TEST/TEST/[github & Xcode files]. I thought I could drag and drop them in but get a popup blocking it. Any thoughts on how to address this. Thank you in advance.
How to create Xcode project without a folder
My one workaround to avoid nested file structure is to create the project in Xcode first with git repo and then link GitHub at the root (with a repo I created on GitHub). Seems like a bit of a faff - if anyone knows how to solve starting in the reverse that would be great. Thanks!
It would be best to start with Xcode. Create your project from the appropriate template with your best guess for a name and save it somewhere appropriate. When you save the project, you'll have the option of creating it in a git repository.
Then, you can create a GitHub repository with the same name. I believe that once you do this, it gives you instructions on how to push a local repository. You can just run those command on the command-line from the directory containing your Xcode project folder. Then refresh your GitHub web browser and you should see all your files. Xcode will automatically detect and use GitHub as the upstream.
I recommend against using the Desktop for Xcode projects. The Desktop could be under control of some kind of file sync service like iCloud. You don't want to mix that with git. It won't turn out well for you.