How to upload folders on GitHub


How can I upload folders to GitHub? I have all of my code in a folder, containing 98 files, on my desktop. I know how to upload files, but it there a way to upload the entire folder?


This question is tagged with github

~ Asked on 2016-11-21 12:25:00

The Best Answer is


This is Web GUI of a GitHub repository:

enter image description here

Drag and drop your folder to the above area. When you upload too much folder/files, GitHub will notice you:

Yowza, that’s a lot of files. Try again with fewer than 100 files.

enter image description here

and add commit message

enter image description here

And press button Commit changes is the last step.

~ Answered on 2016-11-21 15:09:07


You can also use the command line, Change directory where your folder is located then type the following :

     git init
     git add <folder1> <folder2> <etc.>
     git commit -m "Your message about the commit"
     git remote add origin
     git push -u origin master
     git push origin master  

~ Answered on 2020-06-02 15:29:59

Most Viewed Questions: