Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 527
flip79 Avatar asked Oct 22 '12 23:10

flip79


3 Answers

I just solved the same problem, so allow me to share my finding.

  1. From Xcode, select the project root in the Project Navigator.
  2. Right click, and select Add Files to <Your Project>...
  3. Choose README.md; make sure to uncheck the copy-file option and any group, like this: enter image description here
  4. Click Add.
  5. Done.
like image 151
JBT Avatar answered Sep 23 '22 16:09

JBT


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

like image 36
AppsWise Avatar answered Sep 24 '22 16:09

AppsWise


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?

like image 34
kayaker243 Avatar answered Sep 24 '22 16:09

kayaker243