How to upload an entire folder?

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?