How do I upload a new binary file to Github?
I try to upload some woff
fonts, but I cant, because Github allow me only to add a text file, and not how to upload one, even if there is this request that was solved.
Since February 2016, you can add/create/upload new files from GitHub web interface.
You should not upload (big) binary files (they should be generated as part of a release, see second part of this answer).
But the feature (upload a file, any file) is there. See "Upload files to your repositories ":
You can click the “Upload files” button in the toolbar at the top of the file tree.
Or, you can drag and drop files from your desktop onto the file tree.
This replaces the file creation described in the 2012 answer, and add the upload capability (for one or several files).
Original answer (March 2015)
The only part of the GitHub web interface which allows you to push a binary (or any other file you want) is when creating a release.
Then, there is a step where you can drag and drop any binary you need:
But for a regular repo, when creating new files, you can only edit a new file, not drag&drop an existing binary content:
So it isn't possible for now (March 2015)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With