'How can I add a README.md file with Xcode?

I'm trying to add a README.md file in my Xcode Project, and push it to GitHub. How can I do it? Creating a file inside the root of the project doesn't work because - I think - Xcode doesn't see it.



Solution 1:[1]

This is how I did it -

1 - Create a new file by ctrl+click in root folder of the project within xCode.

enter image description here

2 - Once done choose file type other from left pan and then pick empty file. Rename it to Readme.md while saving the file.

3 - The Readme.md file should be created in the root folder as displayed in above screen-shot.

That is it that should do. When you push the code to the repository your Readme.md file should be displayed properly.

B.R

Solution 2:[2]

There are basically two questions here. The first is how to add a README.md file and push it to GitHub. touch README.md; git add README.md; git commit -m "added README.md"; git push origin

The second is one of file visibility. I think what you're running into here is that Xcode keeps a file manifest record of sorts for its projects. Try reading through this question: Xcode does not pick up new class files in SVN

Are you adding the file within Xcode or the terminal/finder?

Solution 3:[3]

You should be able to just add to project File->New->File->Other->Empty

When added you will need to select and do File->Source Control->Add File->Source Control->Commit

Solution 4:[4]

You can also do it this way:

File->New->File->Other->Markdown File

Add a markdown file

Then click on next and by default the name of the file will be README.md

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 Community
Solution 3 stilldodge
Solution 4 Otourou Da Costa