Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create README file inside sub-directory on GitHub

Tags:

git

github

Is it possible to create a README file in a subdirectory on GitHub. I only see the Add a README button when I am in the root directory. It is not visible in subdirectories. Is there any way I can add a README file in a subdirectory and preview it?

like image 757
Upalr Avatar asked Dec 02 '22 11:12

Upalr


2 Answers

  1. Go to the directory directory browsing on GitHub.
  2. Create a new file GitHub file creation button
  3. Name it as README.md entering file name for a new file on GitHub
  4. Commit change
  5. You can see the README in the subdirectory Markdown preview of README.md on GitHub
like image 75
Hamza Anis Avatar answered Dec 09 '22 08:12

Hamza Anis


There is no button to create a README on the GitHub web interface in any folder but the root. If you want to add a README to another folder, you can navigate to that folder and press the "Create new file" button. Just name the file README.md and you'll have the exact same editor available.

like image 38
Michael Mior Avatar answered Dec 09 '22 08:12

Michael Mior