Uploading new files to a Git repository directly through the GitHub web application

Since February 2016, you can add/create/upload new files from the GitHub web interface.

See "Upload files to your repositories ":

You can click the “Upload files” button in the toolbar at the top of the file tree.

https://cloud.githubusercontent.com/assets/1369864/12961550/b9a688ea-d006-11e5-96d3-ac91097192a5.png

Or, you can drag and drop files from your desktop onto the file tree.

https://cloud.githubusercontent.com/assets/1369864/12961164/a888b59e-d004-11e5-80a6-e9f32f17c4d5.gif

This replaces the file creation described in the 2012 answer, and add the upload capability (for one or several files).


Note that since early December 2012, you can create new files directly from GitHub:

Create new File

ProTip™: You can pre-fill the filename field using just the URL.
Typing ?filename=yournewfile.txt at the end of the URL will pre-fill the filename field with the name yournewfile.txt.

d


I think using gist.github.com is the easiest option. Each gist is a Git repository that can be accessed from the web browser or from the shell, there's a comment button, and although gists are usually single files, they can hold multiple files.

The drawbacks to gists are obviously the cryptic URLs and the fact that you have to copy-paste file contents into the browser unless you use a separate tool.

Tags:

Git

Github