CODE

Gitfs

Version controlled file system made by Presslabs, to allow managed WordPress hosting customers to use at the same time Git and SFTP.

gitFS is a FUSE file system that fully integrates with git. You can mount a remote repository’s branch locally, and any subsequent changes made to the files will be automatically committed to the remote.

What’s its purpose?

gitfs was designed to bring the full powers of git to everyone, irrespective of their experience using the tool. You can mount any repository, and all the changes you make will be automatically converted into commits. gitfs will also expose the history of the branch you’re currently working on by simulating snapshots of every commit.

gitfs is useful in places where you want to keep track of all your files, but at the same time you don’t have the possibility of organizing everything into commits yourself. A FUSE file system for git repositories, with local cache.

We open-sourced gitfs so that everyone can benefit from using a version-controlled environment without having to learn anything new.

How the idea came up

The idea of a git file system was conceived out of the need of users to make small changes to the project the developers were working on. Lacking the prior knowledge needed in order to use a version control system, these modifications were bringing nightmares to the development team and a solution was needed. Now you have the possibility of organizing everything into commits yourself with this FUSE file system for git.

See how we’re using it

Features

  • Automatically commits changes: create, delete, update files and their metadata
  • Browse through the working index, and also see the entire commit history, as separate folders, organized by date.
  • The system merges with upstream by automatically accepting local changes.
  • Mounts the file system as a user or a group.
  • Caching commits reduces the memory footprint and speeds up navigation.
  • Reduces the number of commits by grouping pushes.

Use cases

Mount your web server with gitfs for easy deployment and fast rollbacks. Use gitfs on a local project to keep track of all the changes.

Open an issue

How to contribute

Development of gitfs happens on GitHub. You are highly encouraged to contribute with code, tests, documentation, or just to share your experience.

Get involved

The concise contribution guide can be found in the CONTRIBUTING.md file.

License

This project is licensed under the Apache 2.0 license. Have a look at the LICENSE file in the top distribution directory for the complete, unabridged reference.