0 votes
in Git by

create folder in github-How to create folder in github repository?

I want to create a folder in the github repository and add files in that folder. How to achieve this?

1 Answer

0 votes
by
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.

Related questions

0 votes
asked Sep 5, 2020 in Git by SakshiSharma
0 votes
asked Mar 26, 2021 in Git by rajeshsharma
...