8 ms·
Show HN: Gitfs – mount Git repos as local folders
- btown 12y agoDoes it batch changes, i.e. if 5 files are saved within a few seconds of each other? It would also be interesting if that was combined with naming commits based on language processing (i.e. splitting on camel case and snake case, finding the word whose frequency in the current diff is most different from its frequency in the codebase overall). Then you could have human-readable history without any conscious need to maintain it - and this would be developer-friendly, just Save All in Sublime Text and fuhgettaboudit.
- vtemian 12y agoYes, it batches changes. Improving the commit messages is in the pipeline and what you have described sounds interesting. Right now the focus is to get the right semantics for git operations in the context of a filesystem.
- Igglyboo 12y agoIs this an alternative to cloning a repo and pushing changes or is this supposed to be used as a full filesystem? I don't quite understand the blurb.
- zalmanu 12y agoHi. I'm one of the authors of GitFS! It is supposed to work as a fully-fledged filesystem. Do you have in mind a particular use case?
- thebouv 12y agoNo, I think the question is, what do you as an author of the software have in mind as a particular use case? Some examples of why someone would use this would be great.
- vtemian 12y agoWe are using it to expose website code through SFTP to non-developers. Another possible use case can be publishing static sites using jekyll or another tool.
- zalmanu 12y agoWe have given some answers (together with vtemian) related to some of the use cases that we see possbile and to the need that it led to its creation in the first place. But since it's open-source, we are also expecting fresh scenarios in which people would like to use it. Also, contributions are more than welcome! :)
- tijs 12y agomakes sense as a simple deployment tool too i guess? simply mount the stable branch in your 'www' directory and you can push to deploy (for a static files based site at least).
- illumen 12y agoThis might be nice for places where people can't figure out git. I hope it puts "update" as the commit message ;)
- vtemian 12y agoYeap! Check https://github.com/vtemian/gitfs-demo/commits/master https://github.com/vtemian/gitfs-demo/commits/master and you can see how the commit messages look
- michaelmior 12y agoHow do you get commits with more than one file changed? I assume a commit happened every time there was a write to a file on disk which can't occur simultaneously. Do commits just happen on some time interval?
- vtemian 12y agoThe files are queued and are committed in batches after some idle time.
- tughirin 12y agoWhy would somebody use such a file system? To make life easier when working with configuration files? I wish they also described their motive for creating it.
- zalmanu 12y agoA developer or sys admin would use it to keep track of changes a site owner would do via ftp/sftp. We made it for this specific reason. Track everything! :)
- knowtheory 12y agoSo is this intended as a single user sort of tool? I'm curious how merges, conflicts & branching would interact w/ a tool like this, or whether it's just intended as a way to implement a versioned file system essentially where files can be rolled back to previous states.
- vtemian 12y agoCurrently it follows a single branch. The merge strategy is to merge with local changes taking priority over remote ones but this can be plugged-in. Rollbacks can be done by copying from history to current version. The only thing shaky thing is when there is a force push because local commits will be pushed back.
- baldfat 12y agoBesides its use for the work flow for a single person developing an app I fail to see the case for this system.
- vtemian 12y agoIt is intended for non-developers so that they can integrate their workflow with developers working on the same content. It can be used by multiple persons of course but it's not generally targeted for people developing apps or for replacing git.
- listic 12y agoSame content (set of files) but different files? Here's the use case I have in mind: let's say I'm a programmer extending a game [1] built on Undum [2] engine, together with a writer who is writing a story at the same time [3] [1] The Play, A dress rehearsal gone horribly wrong, by Deirdra Kiai. http://squinky.me/theplay/ http://squinky.me/theplay/ [2] http://undum.com/ http://undum.com/ [3] Story file: view-source:http://squinky.me/theplay/theplay.js http://squinky.me/theplay/theplay.js
- hardwaresofton 12y agoI think this kind of file system would do well to power platforms that AREN'T for programmers. While this may not seem useful for programmers (because they are so involved in git usage in the first place), I think others might benefit I've had the idea to make an interative design/architecture plugin for programs like photoshop/3dmax/etc rolling around in my head for a while now. Git is a perfect way to store/save the progress people make in those programs (as files change over time, or as they save), and gitfs seems like it would be the fs to run on the backing server. Instant branching (like when an artist decides to riff on a new idea), undo/rollback, progress tweens/reports.
- TranquilMarmot 12y agoIt's my understanding that Git is pretty bad for storing binary files that change a lot since it has to keep a copy of every version of that file (whereas with plaintext it can just store the diffs). Now, maybe that's what you would want, but that repo is going to get very big very fast. Pulls won't be so bad if your machine already has all the commits, but cloning would be a nightmare. And it'll be taking up a lot of space on your git server.
- vtemian 12y agoYou are right about large binary files and gitfs currently has an option limiting the maximum file size.
- jimktrains2 12y ago> (whereas with plaintext it can just store the diffs) git stores full blobs, not deltas.
- rakoo 12y agoI guess it depends how deep you dive... It is true that on the surface, git gives you the user access to full blobs only and calculates the difference every time you access blobs. But when you go in packfiles the content is actually diff'ed because it compresses so well. In the context of the discussion, since we're interested in the on-disk format, it's more accurate to say that git will try to diff binary blobs, fail at that and so store the full content of blobs.
- filmor 12y agoAwesome, I have been looking for something like this for ages. I have already two use-cases: 1. At work we store a bunch of IPython notebooks in a git repository (with a hook to strip them from any output and other non-essential varying data). Up until now I had to manually or via a scheduled task run "git -A; git commit -m 'Current State.'" on regular intervals. 2. I'm so gonna use this for my portage-tree, which is taking up a lot of disk-space on my SSD :).
- wyldfire 12y agoThe triumphant return of clearcase‽
- nbardy 12y agoAt the last company I worked at clearcase never left.
- rco8786 12y agoHow does it handle merge conflicts? Seems like an interesting idea, my concern would be that the abstraction of a filesystem on top of git would break down really quickly once multiples users started editing things.
- vtemian 12y agoMerging is pluggable and the currently implemented strategy is to merge always accepting the local changes. Actually we are currently using it in an environment in which multiple edits on the same file can be made and as in the case of "regular" filesystem the last one closing the file wins. The advantage is that you will have all the revisions.
- bboreham 12y agoWhat's the performance like? That was always the downside of Clearccase - all the indirecting slugged the machine.
- vtemian 12y agoAs with performance it really depends on your workload. For mostly reads the performance should be quite good since access is mostly passtrough. This is almost true with writes. Reading on "history" has a small performance penalty since if you are reading files which are packed they need to be unpacked on the fly. Listing the "history" is quite fast. We tested on the WordPress repository that has around 17k commits and it takes ~4s first time and less than 1s afterwards.
- whoisthemachine 12y agoThis seems nice as something that sits as a layer over any typical file system, giving a user basic version control without extra effort.
- grizzles 12y agoWow this is really cool. Too bad it's Ubuntu only. Is anyone working on getting it running on Fedora?
- akx 12y agoConsidering it seems to be just Python, I don't see what makes it Ubuntu only.
- dflock 12y agoThis seems very similar to SparkleShare: https://github.com/hbons/SparkleShare https://github.com/hbons/SparkleShare
- lemoncucumber 12y agoI misread the title as GIF FS. I can only imagine what that would consist of...
- TazeTSchnitzel 12y agoEach frame its own file?
- buddy_tucker 12y agoI think I hear my dotfiles calling :)
- seppo0010 12y agoNice. It looks like something I tried a while ago, but never got it stable enough for someone to actually use: https://github.com/seppo0010/gitfuse https://github.com/seppo0010/gitfuse
- zackmorris 12y agoThis is reminiscent of Apple's Time Machine, except each save is the same as manually clicking "Back Up Now", and I assume that commits are more granular so directories can be committed individually rather than the whole tree. I've often wondered if version control systems could be abstracted into a filesystem where each write is a commit, handling merges by choosing the local copy. My primary dissatisfaction with git is that it lacks layers of abstraction. For example it should have had at least the first two distinct components listed below, something like: 1) git-fs (versioned filesystem, only supporting commit, clone and permissions) 2) git-merge (diff utility to handle merge conflicts) 3) git-local (two repositories wrapped in an abstraction to provide local and remote - the special sauce of git) 4) git-util (everything else like repair, reports, statistics, etc) 5) git (umbrella executable above previous layers) I’m not super familiar with git console use so if it already is organized this way, great. But since it is not presented this way in its documentation, I feel that a great opportunity has been missed. We could have used git-fs the same way that people use Dropbox. Instead we have something with a lot of warts (things like .gitignore files interspersed with other files that continue the same mistakes that cvs and svn made, and the inability to save empty directories). I think git’s pattern of pull/commit/push is fantastic, but its shortcomings are so numerous that I’m going to stop knocking it right here before I get myself in trouble. If gitfs ran on the Mac, I’d probably be using it right now to avoid frequent headaches where git interferes with the simplest pattern of pulling, merging by hand and pushing all files back if nobody else has committed in the meantime. I think that’s the motivation behind a library like this, because so many version control systems get the filesystem metaphor wrong and create two much friction by touting their various levers.
- calind 12y agoThere is an update to the docs on how to install it on OSX: http://www.presslabs.com/gitfs/docs/usage/ http://www.presslabs.com/gitfs/docs/usage/
- Dorsai 12y agoFollowed OS X insx but hit a wall with 'mount.fuse <git repo> <mount/folder> What is mount.fuse? I installed Python fuse.py... still poking around...
- kasabali 12y agoLooks to have a similar use case scenario in mind with https://github.com/commandline/flashbake https://github.com/commandline/flashbake, but implemented in a different way. Hopefully it takes off.
- motyar 12y agoHow to install it?
- Jasitis 12y agoHow is it different from SSHFS.Given that both are FUSE & give nearly same functionality. as in sudo autosshfs-user add $(id -un)