在不使用Git的情況下在github.com repo中創建文件夾

本文翻譯自:Creating folders inside github.com repo without using Git

I want to add a new folder to my newly created GitHub repository without installing the Git setup for (Mac/Linux/Win). 我想在我新創建的GitHub存儲庫中添加一個新文件夾而不安裝Git設置(Mac / Linux / Win)。 Is it possible to do so? 有可能這樣做嗎?

I can't have Git all the time with me when I work on different systems/machines. 我不能Git所有的時間陪我,當我在不同的系統/設備的工作。 I know how to add files directly in a repo on github.com/[USER]/[REPO] . 我知道如何直接在github.com/[USER]/[REPO]的回購中添加文件。 Can we create a folder as well? 我們也可以創建一個文件夾嗎?


#1樓

參考:https://stackoom.com/question/1Glry/在不使用Git的情況下在github-com-repo中創建文件夾


#2樓

After searching a lot I find out that it is possible to create a new folder from the web interface, but it would require you to have at least one file within the folder when creating it. 經過大量搜索後,我發現可以從Web界面創建一個新文件夾,但是在創建文件夾時需要至少有一個文件夾。

When using the normal way of creating new files through the web interface, you can type in the folder into the file name to create the file within that new directory. 使用通過Web界面創建新文件的常規方法時,可以在文件夾中鍵入文件夾以在該新目錄中創建文件。

Eg If I would like to create the file filename.md in a series of sub-folders, I can do this (taken from the GitHub Blog): 例如,如果我想在一系列子文件夾中創建文件filename.md,我可以這樣做(取自GitHub博客):

在此輸入圖像描述


#3樓

When creating a file, use slashes to specify the directory. 創建文件時,使用斜槓指定目錄。 For Example: 例如:

Name the file: 命名文件:

repositoryname/newfoldername/filename

GitHub will automatically create a folder with the name newfoldername GitHub將自動創建一個名爲newfoldername的文件夾


#4樓

You can also just enter the website and: 您也可以進入網站並:

  • click upload files 單擊上載文件
  • then drag and drop a folder with files into the "drag files here" area. 然後帶有文件的文件夾拖放到“此處拖動文件”區域。

The same limitation applies here: the folder must contain at least one file inside it. 同樣的限制適用於此:文件夾中必須至少包含一個文件。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章