Somewhat relatedly, GitHub Pages does support using URL-encoded newline characters %0A to reference file names with newlines,[0] but GitHub itself will omit the file from the web UI's tree view.
[0]: https://sheeptester.github.io/hello-world/test/%20%0A%20%0A/...