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
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
Nmap XML output to CSV and HTTP/HTTPS URLS.

xml-to-csv-url Convert NMAP's XML output to CSV file and print URL addresses for HTTP/HTTPS ports. NOTE: OS Version Parsing is not working properly ye

1 Dec 21, 2021
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 simple tool to find and replace all the matches of a regular expression in file(s).

FindREp A simple tool to find and replace all the matches of a regular expression in file(s). You can either select the file(s) directly or select a f

Biraj 5 Oct 18, 2022
A bot discord that can create directories, file, rename, move, navigate throw directories etc....

File Manager Discord What is the purpose of this program ? This program is made for a Discord bot. Its purpose is to organize the messages sent in a c

1 Feb 02, 2022
Various converters to convert value sets from CSV to JSON, etc.

ValueSet Converters Tools for converting value sets in different formats. Such as converting extensional value sets in CSV format to JSON format able

Health Open Terminology Ecosystem 4 Sep 08, 2022
fast change directory with python and ruby

fcdir fast change directory with python and ruby run run python script , chose drirectoy and change your directory need you need python and ruby deskt

XCO 2 Jun 20, 2022
Transforme rapidamente seu arquivo CSV (de qualquer tamanho) para SQL de forma rápida.

Transformador de CSV para SQL Transforme rapidamente seu arquivo CSV (de qualquer tamanho) para SQL de forma rápida, e com isso insira seus dados usan

William Rodrigues 4 Oct 17, 2022
Convert All TXT Files To One File.

AllToOne Convert All TXT Files To One File. Hi 👋 , I'm Alireza A Python Developer Boy 🔭 I’m currently working on my C# projects 🌱 I’m currently Lea

4 Jun 07, 2022
Swiss army knife for Apple's .tbd file manipulation

Description Inspired by tbdswizzler, this simple python tool for manipulating Apple's .tbd format. Installation python3 -m pip install --user -U pytbd

10 Aug 31, 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
Pure Python tools for reading and writing all TIFF IFDs, sub-IFDs, and tags.

Tiff Tools Pure Python tools for reading and writing all TIFF IFDs, sub-IFDs, and tags. Developed by Kitware, Inc. with funding from The National Canc

Digital Slide Archive 32 Dec 14, 2022
BOOTH宛先印刷用CSVから色々な便利なリストを作成してCSVで出力するプログラムです。

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

hinananoha 1 Nov 28, 2021
The best way to convert files on your computer, be it .pdf to .png, .pdf to .docx, .png to .ico, or anything you can imagine.

The best way to convert files on your computer, be it .pdf to .png, .pdf to .docx, .png to .ico, or anything you can imagine.

JareBear 2 Nov 20, 2021
Provides a convenient way to append numpy arrays to a file.

Provides a convenient way to append numpy arrays to a file. The NpendWriter and NpendReader classes are used to write and read numpy arrays respective

3 May 14, 2022
This simple python script pcopy reads a list of file names and copies them to a separate folder

pCopy This simple python script pcopy reads a list of file names and copies them to a separate folder. Pre-requisites Python 3 (ver. 3.6) How to use

Madhuranga Rathnayake 0 Sep 03, 2021
Uncompress DEFLATE streams in pure Python

stream-inflate Uncompress DEFLATE streams in pure Python. Installation pip install stream-inflate Usage from stream_inflate import stream_inflate impo

Michal Charemza 7 Oct 13, 2022
Uproot is a library for reading and writing ROOT files in pure Python and NumPy.

Uproot is a library for reading and writing ROOT files in pure Python and NumPy. Unlike the standard C++ ROOT implementation, Uproot is only an I/O li

Scikit-HEP Project 164 Dec 31, 2022
Python function to stream unzip all the files in a ZIP archive: without loading the entire ZIP file or any of its files into memory at once

Python function to stream unzip all the files in a ZIP archive: without loading the entire ZIP file or any of its files into memory at once

Department for International Trade 206 Jan 02, 2023
Copy only text-like files from the folder

copy-only-text-like-files-from-folder-python copy only text-like files from the folder This project is for those who want to copy only source code or

1 May 17, 2022