gitfs is a FUSE file system that fully integrates with git - Version controlled file system

Overview

gitfs Build Status Coverage Status PyPI

Welcome to GitFS

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.

gitfs was developed by the awesome engineering team at Presslabs, a Managed WordPress Hosting provider.

What's its purpose?

gitfs was designed to bring the full powers of git to everyone, no matter how little they know about versioning. A user can mount any repository and all their changes 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 filesystem for git repositories, with local cache.

Installing

We provide packages for the major Ubuntu releases and MacOS, but you can find community packages for most of popular Linux distributions. If you want to build packages for a distribution, or you already did, please contact us and we'll list it here.

Ubuntu 18.04+

sudo add-apt-repository ppa:presslabs/gitfs
sudo apt-get update
sudo apt-get install gitfs

MacOS

brew install gitfs

Pip

We also publish a package to PyPI, which can be installed via pip using the following commmand:

pip install gitfs

Usage

You can mount a remote or local repository easly, just by providing the repository to clone and a directory used to mount.

gitfs http://your.com/repository.git /mount/directory

The entire filesystem can be tweaked when mounting it, using a set of options.

gitfs [email protected]:user/repo.git /mypath -o
repo_path=/tmp/path,branch=dev,log=-,debug=true,foreground=true,fetch_timeout=0.1,merge_timeout=0.1...

For an entire list of options, you can check the arguments page.

Features

  • Automatically commits changes: create, delete, update files and their metadata
  • Browse through working index and commit history
  • Merges with upstream by automatically accepting local changes
  • Caching commits reduces the memory footprint and speeds up navigation
  • Reduces the number of pushes by batching commits

Development

You can find more documentation on gitfs homepage.

Contributing

Development of gitfs happens at http://github.com/presslabs/gitfs.

Issues are tracked at http://github.com/presslabs/gitfs/issues.

The Python package can be found at https://pypi.python.org/pypi/gitfs/.

You are highly encouraged to contribute with code, tests, documentation or just sharing experience.

Please see CONTRIBUTING.md.

License

This project is licensed under Apache 2.0 license. Read the LICENSE file in the top distribution directory for the full license text.

Comments
  • Can't install on OS X 10.11

    Can't install on OS X 10.11

    I'm having issues installing gitfs on OS X 10.11

    Logs: https://gist.github.com/kaendfinger/4275d68ac2bf1817492b

    Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

    opened by azenla 16
  • Port to python3 [$20]

    Port to python3 [$20]

    Gitfs was written using only Python 2 code, but now, as the things in Python 3 evolves and are very stable, we need to port our Python 2 code to Python 3 compatible code.

    Did you help close this issue? Go claim the $20 bounty on Bountysource.

    bounty 
    opened by vtemian 7
  • Fix installation issues due to outdated deps

    Fix installation issues due to outdated deps

    This fixes pip installation and the associated installation issues:

    • https://github.com/PressLabs/gitfs/issues/273
    • https://github.com/PressLabs/gitfs/issues/271
    • https://github.com/PressLabs/gitfs/issues/268
    • https://github.com/PressLabs/gitfs/issues/267
    opened by nikvdp 5
  • [mac os x sierra] raven==5.27.0 distribution was not found and is required by gitfs

    [mac os x sierra] raven==5.27.0 distribution was not found and is required by gitfs

    $ brew --version
    Homebrew 1.2.4
    Homebrew/homebrew-core (git revision ff3c; last commit 2017-07-06)
    $ uname -mrs
    Darwin 16.6.0 x86_64
    $ brew cask install osxfuse
    # success
    $ brew install gitfs
    # success
    $ gitfs http://52.64.121.123/issues.git issues
    Traceback (most recent call last):
      File "/usr/local/bin/gitfs", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3036, in <module>
        @_call_aside
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3020, in _call_aside
        f(*args, **kwargs)
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3049, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pkg_resources/__init__.py", line 654, in _build_master
        ws.require(__requires__)
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pkg_resources/__init__.py", line 968, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pkg_resources/__init__.py", line 854, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'raven==5.27.0' distribution was not found and is required by gitfs
    
    opened by khoan 5
  • pygit2 version needs to be bumped

    pygit2 version needs to be bumped

    pygit2 0.26.0 adds support for libgit2 0.26.0, so the version in requirements.txt should be bumped so that gitfs doesn't conflict with the latest libgit2.

    Cf. https://github.com/Homebrew/homebrew-core/pull/14731

    As a side note, fusepy 2.0.4 is also available now.

    opened by ilovezfs 4
  • Port to python3

    Port to python3

    OK, Python 3.4 support works fine. It would be cool to have it test for Python 2.7 as well at some point. Are you planning to support Python 2 long term?

    opened by justuswilhelm 4
  • Installation error: Command

    Installation error: Command "python setup.py egg_info" failed with error code 1

    Encountering this installation error on macOS Sierra:

    Stians-Mac-mini:~ stian$ brew install homebrew/fuse/gitfs
    ==> Installing gitfs from homebrew/fuse
    ==> Using the sandbox
    ==> Downloading https://github.com/PressLabs/gitfs/archive/0.4.5.1.tar.gz
    Already downloaded: /Users/stian/Library/Caches/Homebrew/gitfs-0.4.5.1.tar.gz
    ==> Downloading https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz
    Already downloaded: /Users/stian/Library/Caches/Homebrew/gitfs--homebrew-virtualenv-15.0.2.tar.gz
    ==> python -c import setuptools... --no-user-cfg install --prefix=/tmp/gitfs--homebrew-virtualenv-20170105-62989-mbq7ql/target --single-version-externally-managed --record=installed.txt
    ==> python -s /tmp/gitfs--homebrew-virtualenv-20170105-62989-mbq7ql/target/bin/virtualenv -p python /usr/local/Cellar/gitfs/0.4.5.1/libexec
    ==> Downloading https://files.pythonhosted.org/packages/86/8c/70aea8215c6ab990f2d91e7ec171787a41b7fbc83df32a067ba5d7f3324f/atomiclong-0.1.1.tar.gz
    Already downloaded: /Users/stian/Library/Caches/Homebrew/gitfs--atomiclong-0.1.1.tar.gz
    ==> /usr/local/Cellar/gitfs/0.4.5.1/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/gitfs--atomiclong-20170105-62989-1ngho46/atomiclong-0.1.1
    Last 15 lines from /Users/stian/Library/Logs/Homebrew/gitfs/03.pip:
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pip/commands/install.py", line 335, in run
        wb.build(autobuilding=True)
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pip/wheel.py", line 749, in build
        self.requirement_set.prepare_files(self.finder)
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
        ignore_dependencies=self.ignore_dependencies))
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
        abstract_dist.prep_for_dist()
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
        self.req_to_install.run_egg_info()
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pip/req/req_install.py", line 439, in run_egg_info
        command_desc='python setup.py egg_info')
      File "/usr/local/Cellar/gitfs/0.4.5.1/libexec/lib/python2.7/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
        % (command_desc, proc.returncode, cwd))
    InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-zmQCsP-build/
    
    READ THIS: https://git.io/brew-troubleshooting
    
    Stians-Mac-mini:~ stian$ 
    
    opened by stianhoiland 3
  • SyncWorker fails silently

    SyncWorker fails silently

    Sometimes, under suspect circumstances, SyncWorker will fail and no synchronization will be done.

    Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

    opened by vtemian 3
  • Misaligned code bug

    Misaligned code bug

    Hi guys,

    I was just checking out the source code, coming from BountySource. I noticed on lines 446 - 462, the code is not indented. They are referencing first_commit and second_commit which are only defined within the loop.

    Let me know if this is correct and I'll fire away a PR.

    ~ Daniel

    opened by daniellockyer 3
  • Bugs bounty [$10]

    Bugs bounty [$10]

    We want to make gitfs as stable as possible, so we are in search for bugs. We'll add a bounty on bountysource.com for each discovered bug.

    There is a $10 open bounty on this issue. Add to the bounty at Bountysource.

    bounty easy 
    opened by vtemian 3
  • Log exception messages on failures

    Log exception messages on failures

    For example when a fetch fails, it only logs Fetch failed without a reason. We should log exceptions with log.exception(message). This would make debugging errors much more easy.

    This I found to be the case only on FetchWorker.

    bug 
    opened by calind 3
  • Can't install

    Can't install

    Hi, doesn't install in newer ubuntu with the commands you give.

    installing with brew, running gives this error.

    Traceback (most recent call last): File "/home/linuxbrew/.linuxbrew/bin/gitfs", line 33, in sys.exit(load_entry_point('gitfs==0.5.1', 'console_scripts', 'gitfs')()) File "/home/linuxbrew/.linuxbrew/Cellar/gitfs/0.5.2_9/libexec/lib/python3.9/site-packages/gitfs/init.py", line 19, in mount from gitfs.mounter import start_fuse File "/home/linuxbrew/.linuxbrew/Cellar/gitfs/0.5.2_9/libexec/lib/python3.9/site-packages/gitfs/mounter.py", line 22, in from pygit2.remote import RemoteCallbacks ImportError: cannot import name 'RemoteCallbacks' from 'pygit2.remote' (/home/linuxbrew/.linuxbrew/Cellar/gitfs/0.5.2_9/libexec/lib/python3.9/site-packages/pygit2/remote.py)

    opened by nkh 0
  • Python atomiclong seems to be discontinued

    Python atomiclong seems to be discontinued

    I was just looking through the dependencies and noticed that the atomiclong dependency (requirements.txt) seems to be discontinued with the developer saying not to use it. I'm not sure if this recommendation is because they wish to no longer maintain it or if there are underlying issues, does anyone have any input or awareness involving this?

    opened by Doom4535 0
  • Python 3.10: MutableMapping has moved to collections.abc

    Python 3.10: MutableMapping has moved to collections.abc

    https://docs.python.org/3/whatsnew/3.10.html#removed bullet eight...

    • Remove deprecated aliases to Collections Abstract Base Classes from the collections module. (Contributed by Victor Stinner in bpo-37324.)

    Related to Homebrew/homebrew-core#90923

    opened by cclauss 1
Releases(0.5.2)
Owner
Presslabs
Smart Managed WordPress Hosting
Presslabs
A simple library for temporary storage of small files

TemporaryStorage An simple library for temporary storage of small files. Navigation Install Usage In Python console As a standalone application List o

2 Apr 17, 2022
Vericopy - This Python script provides various usage modes for secure local file copying and hashing.

Vericopy This Python script provides various usage modes for secure local file copying and hashing. Hash data is captured and logged for paths before

15 Nov 05, 2022
Small Python script to generate a calendar (.ics) file from SIMASTER courses schedule.

simaster.ics Small Python script to generate a calendar (.ics) file from SIMASTER courses schedule. Usage Getting the events.json file from SIMASTER O

Faiz Jazadi 8 Nov 02, 2022
OneDriveExplorer - A command line and GUI based application for reconstructing the folder strucure of OneDrive from the UserCid.dat file

OneDriveExplorer - A command line and GUI based application for reconstructing the folder strucure of OneDrive from the UserCid.dat file

Brian Maloney 100 Dec 13, 2022
Find potentially sensitive files

find_files Find potentially sensitive files This script searchs for potentially sensitive files based off of file name or string contained in the file

4 Aug 20, 2022
Simple, convenient and cross-platform file date changing library. 📝📅

Simple, convenient and cross-platform file date changing library.

kubinka0505 15 Dec 18, 2022
Python package to read and display segregated file names present in a directory based on type of the file

tpyfilestructure Python package to read and display segregated file names present in a directory based on type of the file. Installation You can insta

Tharun Kumar T 2 Nov 28, 2021
A Python script to backup your favorite Discord gifs

About the project Discord recently felt like it would be a good idea to limit the favorites to 250, which made me lose most of my gifs... Luckily for

4 Aug 03, 2022
Pti-file-format - Reverse engineering the Polyend Tracker instrument file format

pti-file-format Reverse engineering the Polyend Tracker instrument file format.

Jaap Roes 14 Dec 30, 2022
A tool written in python to generate basic repo files from github

A tool written in python to generate basic repo files from github

Riley 7 Dec 02, 2021
Here is some Python code that allows you to read in SVG files and approximate their paths using a Fourier series.

Here is some Python code that allows you to read in SVG files and approximate their paths using a Fourier series. The Fourier series can be animated and visualized, the function can be output as a tw

Alexander 12 Jan 01, 2023
FUSE filesystem Python scripts for Nintendo console files

ninfs (formerly fuse-3ds) is a FUSE program to extract data from Nintendo game consoles. It works by presenting a virtual filesystem with the contents of your games, NAND, or SD card contents, and yo

Ian Burgwin 343 Jan 02, 2023
An easy-to-use library for emulating code in minidump files.

dumpulator Note: This is a work-in-progress prototype, please treat it as such. An easy-to-use library for emulating code in minidump files. Example T

Duncan Ogilvie 362 Dec 31, 2022
This is a junk file creator tool which creates junk files in Internal Storage

This is a junk file creator tool which creates junk files in Internal Storage

KiLL3R_xRO 3 Jun 20, 2021
useful files for the Freenove Big Hexapod

FreenoveBigHexapod useful files for the Freenove Big Hexapod HexaDogPos is a utility for converting the Freenove xyz co-ordinate system to servo angle

Alex 2 May 28, 2022
Dragon Age: Origins toolset to extract/build .erf files, patch language-specific .dlg files, and view the contents of files in the ERF or GFF format

DAOTools This is a set of tools for Dragon Age: Origins modding. It can patch the text lines of .dlg files, extract and build an .erf file, and view t

8 Dec 06, 2022
Object-oriented file system path manipulation

path (aka path pie, formerly path.py) implements path objects as first-class entities, allowing common operations on files to be invoked on those path

Jason R. Coombs 1k Dec 28, 2022
PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

phithon 53 Nov 07, 2022
A platform independent file lock for Python

py-filelock This package contains a single module, which implements a platform independent file lock in Python, which provides a simple way of inter-p

Benedikt Schmitt 497 Jan 05, 2023
Publicly Open Amazon AWS S3 Bucket Viewer

S3Viewer Publicly open storage viewer (Amazon S3 Bucket, Azure Blob, FTP server, HTTP Index Of/) s3viewer is a free tool for security researchers that

Sharon Brizinov 377 Dec 02, 2022