I want to create a folder in a GitHub repository and want to add files in that folder. How do I achieve this?
First you have to clone the repository to you local machine
git clone github_url local_directory
Then you can create local folders and files inside your local_directory, and add them to the repository using:
git add file_path
You can also add everything using:
git add .
Note that Git does not track empty folders. A workaround is to create a file inside the empty folder you want to track. I usually name that file empty, but it can be whatever name you choose.
Finally, you commit and push back to GitHub:
git commit
git push
For more information on Git, check out the Pro Git book.