Settings

Theme

Show HN: Hubfs – File System for GitHub

github.com

160 points by billziss 4 years ago · 31 comments (30 loaded)

Reader

billzissOP 4 years ago

HUBFS is a file system for GitHub and Git. Git repositories and their contents are represented as regular directories and files and are accessible by any application, without the application having any knowledge that it is really accessing a remote Git repository. The repositories are writable and allow editing files and running build operations.

  • pwdisswordfish9 4 years ago

    Or you could, you know, clone the repository into a local working tree.

    • pizza 4 years ago

      Have you ever read this HN comment from 2007 before? [0]

      > I have a few qualms with this app...

      Different paths towards the same outcome should multiply, so we can increase the surface area of the bandages on the different pain points along the way.

      [0] https://news.ycombinator.com/item?id=9224

    • VWWHFSfQ 4 years ago

      Snarky drive-by comments like this are the worst part of HN.

    • gravypod 4 years ago

      That works well for small repos or a few repos but if you want to find all cc files, at all release branch's, in your entire company and check for some exploit it is helpful to have a VFS. Makes it so you could also support N SCMs through one API. You just need to make a new VFS.

    • cle 4 years ago

      Stop for a moment and consider what the tradeoffs of that could be and why it might not work well in some situations.

      • pwdisswordfish9 4 years ago

        - Higher latency

        - Less efficient use of bandwidth, as the git protocol is optimised for bulk transfers

        - Not resilient against unreliable connectivity

        - No support for repositories not hosted on GitHub

        Yes, I can think of some.

andrew_ 4 years ago

I've often thought of using git/github as a document store to replace google drive. I might experiment with this and rsync to see if that makes it possible.

gillesjacobs 4 years ago

So this is allowing remote git repositories to be treated as a regular filesystem. I really cannot think for good use-cases for this.

Maybe to use existing file-based indexing and search tools? I must be missing prime use-cases here.

  • int_19h 4 years ago

    Browsing source code of third party libraries that you're using?

    This could be especially nice with some debugger integration, if you could just step into a library function, and have the corresponding file opened via hubfs...

  • edjw 4 years ago

    Your company keeps some things on GitHub but not everyone in the company wants to learn git, the command line, the concepts around git.

  • mfbx9da4 4 years ago

    Like ssh into your server with GitHub actions

lostintangent 4 years ago

Very cool! I love using GitHub repos and gists for managing my personal notes/code snippets, and currently use GistPad as an editor-level virtual file system (for VS Code). But having an OS-level equivalent is _super_ useful.

Any plans to add support for gists to Hubfs?

  • turbocon 4 years ago

    Gists are just repos under the hood, it should work natively.

    • lostintangent 4 years ago

      Yeah good point! Though I was also thinking about the ability to easily create/edit/delete gists, by means of file system operations. For example, it would be pretty cool if you could create a directory in some “gists” mount point, and have it transparently create a gist for it. Then, as you add/edit/delete files in that directory, those changes are reflected in the gist’s repo.

tedunangst 4 years ago

I don't think the filtering they mention for security actually works? Anybody who clones a repo on GitHub can make their own commits appear under the original org url when accessed by ref.

emptyparadise 4 years ago

This is cool. I often want to open random files from random GitHub repos in a proper text editor but can't be bothered to pull the whole repository just for that.

  • klavinski 4 years ago

    If you are signed in, you can hit '.' on your keyboard when browsing a GitHub repo to open it in VS Code in your browser.

adibalcan 4 years ago

I do not understand what problem solves

amelius 4 years ago

Does it support snapshots?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection