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
This program can help you to move and rename many files at once

This program can help you to rename and save many files in a folder in seconds, but don't give the same name to files, it can delete both files.

João Assalim 1 Oct 10, 2022
CSV-Handler written in Python3

CSVHandler This code allows you to work intelligently with CSV files. A file in CSV syntax is converted into several lists, which are combined in a to

Max Tischberger 1 Jan 13, 2022
Python's Filesystem abstraction layer

PyFilesystem2 Python's Filesystem abstraction layer. Documentation Wiki API Documentation GitHub Repository Blog Introduction Think of PyFilesystem's

pyFilesystem 1.8k Jan 02, 2023
A python script generate password files in plain text

KeePass (or any desktop pw manager?) Helper WARNING: This script will generate password files in plain text. ITS NOT SECURE. I needed help remembering

Eric Thomas 1 Nov 21, 2021
MetaMove is written in Python3 and aims at easing batch renaming operations based on file meta data.

MetaMove MetaMove is written in Python3 and aims at easing batch renaming operations based on file meta data. MetaMove abuses eval combined with f-str

Jan Philippi 2 Dec 28, 2021
CleverCSV is a Python package for handling messy CSV files.

CleverCSV is a Python package for handling messy CSV files. It provides a drop-in replacement for the builtin CSV module with improved dialect detection, and comes with a handy command line applicati

The Alan Turing Institute 1k Dec 19, 2022
Python module that parse power builder file (PBD) and analyze code

PowerBuilder-decompile Python module that parse power builder file (PBD) and analyze code (Incomplete) this tool is composed of: pbd_dump.py pbd file

Samy Sultan 8 Dec 15, 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
Media file renamer and organizion tool

mnamer mnamer (media renamer) is an intelligent and highly configurable media organization utility. It parses media filenames for metadata, searches t

Jessy Williams 533 Dec 29, 2022
Maltego transforms to pivot between PE files based on their VirusTotal codeblocks

VirusTotal Codeblocks Maltego Transforms Introduction These Maltego transforms allow you to pivot between different PE files based on codeblocks they

Ariel Jungheit 18 Feb 03, 2022
Python's Filesystem abstraction layer

PyFilesystem2 Python's Filesystem abstraction layer. Documentation Wiki API Documentation GitHub Repository Blog Introduction Think of PyFilesystem's

pyFilesystem 1.8k Jan 02, 2023
shred - A cross-platform library for securely deleting files beyond recovery.

shred Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayPal: https:

4 Sep 04, 2021
A wrapper for DVD file structure and ISO files.

vs-parsedvd DVDs were an error. A wrapper for DVD file structure and ISO files. You can find me in the IEW Discord server

7 Nov 17, 2022
A tiny Configuration File Parser for Python Projects

A tiny Configuration File Parser for Python Projects. Currently working on JSON Config Files only.

Tanmoy Sen Gupta 1 Feb 12, 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
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
BOOTH宛先印刷用CSVから色々な便利なリストを作成してCSVで出力するプログラムです。

BOOTH注文リスト作成スクリプト このPythonスクリプトは、BOOTHの「宛名印刷用CSV」から、 未発送の注文 今月の注文 特定期間の注文 を抽出した上で、各注文を商品毎に一覧化したCSVとして出力するスクリプトです。 簡単な使い方 ダウンロード 通常は、Relaseから、booth_ord

hinananoha 1 Nov 28, 2021
Simple archive format designed for quickly reading some files without extracting the entire archive

Simple archive format designed for quickly reading some files without extracting the entire archive

Jarred Sumner 336 Dec 30, 2022
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