How to Create Directory in Github
·2 min read
In this article
Here's how to create directory in GitHub
- Navigate to your GitHub repository and click the 'Add file' button.
- Choose 'Create new file' from the dropdown menu.
- Type your desired directory name followed by a forward slash in the filename field.
- Enter a filename after the directory path, such as 'README.md' or any other file.
- Add any necessary content to your new file.
- Scroll down and click the 'Commit changes' button.
- Enter a descriptive commit message and optional description for your changes.
- Click 'Commit changes' again to finalize the directory creation.
- Your new directory will now appear in your repository file structure.
Ready to get started with
interactive demos?
Frequently Asked Questions
No, GitHub doesn't allow completely empty directories. You must create at least one file inside the directory for it to exist in your repository. This is a limitation of Git itself, not just GitHub's interface.



