Reminds me of Rational ClearCase, which probably inspired the idea. You could specify a "view" using tags, and it'd present it as a filesystem to remote machines. I think IBM now own them.
Mounting Git commits as folders with NFS
11–20 of 95 posts
Re: Mounting Git commits as folders with NFS
#12For those who resonate with "why might this be useful", here are "plain git" alternatives to this tool: > searching for a function I deleted git log -G someFunc > quickly looking at a file on another branch to copy a line from it I use `git worktree` to "mount" long-running branches much to the same effect as Julias tool. To quickly look at a file from a non-mounted branch/commit, I use: git show $REF:$FILENAME > sea…
It's kind of funny, I think, how most git users don't seem to know how to access any version other than the current one. So many people think of it simply as the annoying tool you have to use to make code changes but don't really know what version control is.
Re: Mounting Git commits as folders with NFS
#13Very nice! I really like the design choices here. Though I (edit: am biased and) would personally have used Rust and https://github.com/xetdata/nfsserve .
Re: Mounting Git commits as folders with NFS
#14Re: Mounting Git commits as folders with NFS
#15Git already has a similar feature. It's called worktree https://git-scm.com/docs/git-worktree For example: `git worktree add ` checks out that commit in that folder.
Re: Mounting Git commits as folders with NFS
#16Very nice! I really like the design choices here. Though I (edit: am biased and) would personally have used Rust and https://github.com/xetdata/nfsserve .
Functional but not complete. The project is looking for maintainers. Overall it is a pity how so many potentially great Rust projects are inactive and left in incomplete state.
Re: Mounting Git commits as folders with NFS
#17Re: Mounting Git commits as folders with NFS
#18Git already has a similar feature. It's called worktree https://git-scm.com/docs/git-worktree For example: `git worktree add ` checks out that commit in that folder.
This saves me from throwing away my working copy when I switch to a different task;
/source/repos/AcmeCorp 2fddd74f9a [bug/CurrentWork]
/source/repos/AcmeCorp-hotfix 27175cf6c5 [hotfix/2023-11-27.1]
/source/repos/AcmeCorp-master 016ca20b75 [master]
/source/repos/AcmeCorp-reference 454be5348d [feature/RecentReviewedWork]
/source/repos/AcmeCorp-release 95027177d7 [release9.12.0]Re: Mounting Git commits as folders with NFS
#19> Git repositories sometimes have submodules. I don’t understand anything about submodules so right now I’m just ignoring them. Submodules are interesting, because they’re next to unusable from a user perspective (they’re a pain to maintain and interact with unless you never ever update them) but they’re ridiculously simple technically which I assume is what made them attractive. A submodule is an entry in “.gitmodul…
To add to this, Submodules are a hack on Git's data model. Git's data model, put simply, is this: * Branches are pointers to Commit objects * Commit objects are a composite of {Commit_Comment, Tree, Parent Commit(s)}, referenced by the hash of that set * a Tree (like a directory) is a list of Blobs and/or Trees (associating filenames with them) referenced by the hash of its contents. * a Blob is a file, referenced by…
Nit: the data model has refs, which are pointer to objects.
Branches are the subset of refs in the special-cased heads/ namespace which should be pointing to commit objects.
And there’s also tags, which are the subset of refs in the special-cased tags/ namespace, which should be pointing to commit (“lightweight”) or tag (“annotated”) objects.
Re: Mounting Git commits as folders with NFS
#20Yes. This is a pet peeve of mine.