It helps perform file operations over a git repository. It clones the git repository and returns python file system 2's OSFS instance.
The idea originates from moban, which uses git repositories as a vehicle to have versioned templates for the creation of a new python package. Surely, it can be implemented in any other ways but moban v0.6.0 mandates python file system 2 interface. Hence this library is written.
>>> import fs
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git!/templates")
>>> git_fs.readtext("_version.py.jj2")
'__version__ = "0.0.3"\n__author__ = "C.W."\n'
>>> import fs
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git?branch=master!/templates")
>>> git_fs.read("_version.py.jj2")
'__version__ = "0.0.3"\n__author__ = "C.W."\n'
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git?branch=master&submodule=true!/templates")
Yes locally, it will write as you can do so without using gitfs2. And no, it does help commit and push the changes for you.
Plus, the intention is never to write to a repository.
You can install gitfs2 via pip:
$ pip install gitfs2
or clone it and install it:
$ git clone https://github.com/moremoban/gitfs2.git
$ cd gitfs2
$ python setup.py install