GitHub upload files and folders and single files larger than 25M

There are several places where you can directly drag and drop to upload (one of them is shown in the figure below), and the directory structure will not change whether it is a file or a folder. The folder that can be uploaded at one time requires that the number of files inside it does not exceed 100. Otherwise, first create a new folder on GitHub (Gahuo with empty files) and then upload the files in batches to the newly created folder in the corresponding GitHub directory. . In fact, it's that simple, everything is OVER. But if a single file is larger than 25M, it will not work, and it is not supported. I heard that some people can directly drag and upload a single file over 25M with the chrome browser. I haven't tested it and reserve the possibility. This article is uploaded using the git client command.

 

Reference: (230 messages) How to upload files to the GitHub warehouse - a brief description of the operation_songcy1405's blog-CSDN blog

 My UnityPlayer.dll file is 27M, dragging and dropping doesn't work, and I created a new one 1670469441798.png (it doesn't matter, it's relatively small). The picture above is a screenshot of the network after I uploaded it successfully. The two additional docs in the commit remark were uploaded together (the remark of the same batch of uploads is the same).

First download and install git. The download address is given here, and you can install it directly after downloading:

Git for Windows

After installation, the right-click menu of the mouse will be different. The Git Bash Here menu is available, and this is mainly used.

 Log in to your github with the account password in the browser, so that you don’t need to enter the account password and other intermediate links when you follow the command operation.

Local operation: 1. Create a new folder Githubfolder (the name is arbitrary, preferably in English, built in the root directory of D drive);

  2. Right-click on this folder and select the Git Bash Here menu, and then a command window with the folder Githubfolder as the directory will pop up, as shown in the figure below;

3. Enter git clone https://github.com/houzengtao/360VideoPlayer.git to download the internal files of the 360VideoPlayer project on the Internet to the folder Githubfolder (https://github.com/houzengtao/360VideoPlayer.git is your project connection as shown below location to copy).

The download process is as shown below

 The local folder Githubfolder has more project files, as shown in the figure below (showing the status before uploading two files):

 4. Copy the two files to be uploaded to the local 360VideoPlayer folder, especially those larger than 25M, as shown below:

 5. Enter cd 360VideoPlayer in the command window to enter the folder you just downloaded

 6. Initialize git init (it may not be initialized, or this step may be before git clone, that is, step 3)

 7. Then the three steps are as follows, and it is done.

git add . (Note: Don’t forget the following ., this operation is to add all the files under the 360VideoPlayer folder)

git commit -m "additional doc" (Note: "additional doc" is replaced by .. You are free, such as "first commit")

git push -u origin main (push the local warehouse to github, if you have not logged in to the github website at the beginning, you need to enter your account number and password in this step. Note: main represents the main branch on my website, and many people use master here , that should be the branch named master on their website. This is very important. It took a lot of time to spread it to the place I wanted, but accidentally built a master branch for me, and then there are only those two branches in it. The file can't be moved to the main yet, so I'm mad.)

 7. OK, refresh the website page to see the uploaded files.

The following is a summary of other people's instructions, as a backup reference, as shown in the figure below:

 

Guess you like

Origin blog.csdn.net/weixin_44345862/article/details/128240194