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
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 you can browse and copy out just the files that you need.

Ian Burgwin 343 Jan 2, 2023
Extract an archive file (zip file or tar file) stored on AWS S3

S3 Extract Extract an archive file (zip file or tar file) stored on AWS S3. Details Downloads archive from S3 into memory, then extract and re-upload

Evan 1 Dec 14, 2021
MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts.

SaveTools MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts. Credits Written by Asteris

null 31 Nov 17, 2022
A python script to convert an ucompressed Gnucash XML file to a text file for Ledger and hledger.

README 1 gnucash2ledger gnucash2ledger is a Python script based on the Github Gist by nonducor (nonducor/gcash2ledger.py). This Python script will tak

Thomas Freeman 0 Jan 28, 2022
This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that have that extension.

FileBulk This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that h

Enoc Mena 1 Jun 26, 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
Search for files under the specified directory. Extract the file name and file path and import them as data.

Search for files under the specified directory. Extract the file name and file path and import them as data. Based on that, search for the file, select it and open it.

G-jon FujiYama 2 Jan 10, 2022
Small-File-Explorer - I coded a small file explorer with several options

Petit explorateur de fichier / Small file explorer Pour la première option (création de répertoire) / For the first option (creation of a directory) e

Xerox 1 Jan 3, 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
Generates a clean .txt file of contents of a 3 lined csv file

Generates a clean .txt file of contents of a 3 lined csv file. File contents is the .gml file of some function which stores the contents of the csv as a map.

Alex Eckardt 1 Jan 9, 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 7, 2022
Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

laojunjun 13 Nov 23, 2022
File-manager - A basic file manager, written in Python

File Manager A basic file manager, written in Python. Installation Install Pytho

Samuel Ko 1 Feb 5, 2022
Two scripts help you to convert csv file to md file by template

Two scripts help you to convert csv file to md file by template. One help you generate multiple md files with different filenames from the first colume of csv file. Another can generate one md file with several blocks.

null 2 Oct 15, 2022
A simple Python code that takes input from a csv file and makes it into a vcf file.

Contacts-Maker A simple Python code that takes input from a csv file and makes it into a vcf file. Imagine a college or a large community where each y

null 1 Feb 13, 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
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
Import Python modules from any file system path

pathimp Import Python modules from any file system path. Installation pip3 install pathimp Usage import pathimp

Danijar Hafner 2 Nov 29, 2021
OnedataFS is a PyFilesystem interface to Onedata virtual file system

OnedataFS OnedataFS is a PyFilesystem interface to Onedata virtual file system. As a PyFilesystem concrete class, OnedataFS allows you to work with On

onedata 0 Jan 10, 2022