Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)
I want to create a folder in the github repository and add files in that folder. How to achieve this?

1 Answer

+1 vote
by (62.9k points)

You cannot create an empty folder and then add files to that folder, but instead, the creation of a folder must happen together with the addition of at least a single file. On Github you can do it this way:

  • go to the folder within which you would like to make another folder

  • Click on New file

  • on the text field for the file name, first, write the folder name you want to create

  • then type /. This creates a folder

  • you can add more folders similarly

  • finally, give the new file a name, (eg. .gitkeep which is conventionally used to allow git to track otherwise empty folders; not a git feature though)

  • finally, click Commit new file.

create folder in github-How to create folder in github repository?
Intellipaat-community
by (100 points)
Hi,
Thanks for the post. It works. can I go further and make the new folder private? Just the folder, not the whole repo

Browse Categories

...