Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 14

How to upload an entire folder?

Solved! Go to Solution.

I clicked on my repo in a browser, then I clicked on Upload Files. I would like to upload an entire folder so that GitHub would preserve the hierarchy of the files and folders in my folder, but I am not able to select folders to be uploaded. How would I upload an entire folder of an XCode project?

13 Replies
Community Manager
Message 2 of 14

Re: How to upload an entire folder?

There isn't a way to upload an entire folder through the web UI. The easiest way to do that would be to:

 

  1. Clone the repository locally
  2. Make the changes to the local version
  3. Commit the changes locally
  4. Push the changes back up to the GitHub repository

 

You can find out more information about this process in our help documentation. Let us know if you have any questions.

Solution
Copilot Lvl 2
Message 3 of 14

Re: How to upload an entire folder?

you should just try to drag and drop your entire folder in the webui and it will upload whole folder.

Moderator
Message 4 of 14

Re: How to upload an entire folder?

Wanted to confirm here, that dragging and dropping a folder into the Web UI will now, indeed, create that folder in (and upload the files within it to) your GitHub repo. See: https://help.github.com/articles/adding-a-file-to-a-repository/ for more info.

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Ground Controller Lvl 1
Message 5 of 14

Re: How to upload an entire folder?

I have tried to upload a folder with drag and drop option but it's not working. So can you please suggest me how to upload an entire folder?

Moderator
Message 6 of 14

Re: How to upload an entire folder?

@Siva-TN Is the repo you're trying to upload the folder to public? If so, can you share the link to it? Also, what file formats are contained in the folder you're trying to upload? 

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 2
Message 7 of 14

Re: How to upload an entire folder?

Or use command line:

cd into the directory where your folder is located

type:

git init
git add <folder1> <folder2> <etc.>
git commit -m "Your message about the commit"
git remote add origin https://github.com/yourUsername/yourRepository.git
git push -u origin master
git push origin master
Ground Controller Lvl 1
Message 8 of 14

Re: How to upload an entire folder?

how to set path format in git add <folder>

Ground Controller Lvl 1
Message 9 of 14

Re: How to upload an entire folder?

I have tried to drag the folder but it shows folder contains more than 100 files, try with less number of files, is there another way to do so?, i have nearly train_data images in my folder.

Highlighted
Ground Controller Lvl 1
Message 10 of 14

Re: How to upload an entire folder?

Didn't work  in FF. GC worked fine though...