I only need one particular file from a project published on GitHub so it makes little sense to download the whole project. But I just can't find the download button.
In the list of files, every filename is a link. A simple right-click and "Save link as..." (or equivalent for your browser) will allow you to download a single file.
This breaks down with HTML files, however. You'll need to use the "Raw" button on the file page as Eight Days of Malaise's answer describes. I'm using Google Chrome. You may have a different experience on a different browser.
You can try github-files-fetcher, it is a command line tool which downloads a single folder or file from a GitHub repo.
Think a real scenario: you were visiting the following webpage page and wanna download the
async subdirectory alone.
github-files-fetcher, you should first copy the
url of that page, which is https://github.com/reduxjs/redux/tree/master/examples/async, and then run the command below in command line: