I found several posts on stackoverflow with this same question, but the most recent answer from all those posts is dated back in July 2019 on this post.
Is that answer still a good answer and is complete and up to date?
I'm specifically referring to this answer by Vikram Sinha I wrote below. That was the most recent answer given of all the answers I found on stackoverflow.
Note:Specially for Xcode 11
CD to project directory using terminal
git init
git add .
git commit -m "Initial commit"
After this restart the Xcode and choose Source >Control Navigator and then select the master and >right click then choose option "Create Remote"
CodePudding user response:
In Xcode choose Source Control > New Git Repositories to create a git repository for an existing Xcode project.