我想在GitHub存储库中创建一个文件夹,然后将文件添加到该文件夹中。
我该如何实现这个目标?
1. Login into Github.
2. Select your repository.
3. Tap on "Add file" to the "Create New File" Option.
4. Enter your Folder Name(Ex: RepositoryName/FolderName) and enter "/".
5. Enter file name to commit. I have created README.md for each folder so that it will be easy for me to maintain the details of every folder.
6. Scroll down to the Commit new file section.
7. Choose an option to merge directly to the "master" branch or "Create a new branch".
8. Finally, You need to tap on "Commit new file".
现在,当你点击提交新文件时,它将会创建这个文件并带你返回到代码库中。
这是一种简单快捷的,目前可用的浏览器方法,用于在存储库中创建文件夹
1)点击存储库/创建新存储库。
2)点击创建添加文件,然后创建一个新文件。
3)使用“/”符号给要创建的文件夹命名,然后在其中添加文件
4)提交更改
按顺序单击此处以获得上述步骤的视觉表示。
要添加一个新目录,您只需要在本地存储库中创建一个新文件夹。创建一个新文件夹,并在其中添加一个文件。
现在进入终端并像在Git中添加普通文件一样添加它。将它们推送到存储库中,并检查状态以确保您已创建了一个目录。
这是我推荐的简单解决方案:
1. 导航到您想要创建文件夹的存储库。
2. 在右上角点击 添加文件
,选择 创建新文件
。
3. 在名称字段中输入文件夹名称,后面加上 /
(斜杠),然后以 "temp.txt" 为例进行输入。接下来,点击 提交更改
并确认。
按照这些步骤操作后,文件夹将被创建。一旦您将文件上传到文件夹中,可以继续删除 "temp.txt" 文件。
<存储库名称>/
中,输入路径/到/新文件夹/文件名
,