Git Product home page Git Product logo

git-fs's Introduction

git-fs

git-fs is a filesystem interface to git repositories.

Past and current versions can be accessed without a checkout. Heads, tags, branches, reflogs, commits and worktrees provide various means of naming and accessing files.

Use cases

You can try these on the git.git repository.

Compute repository statistics

How much code in the first major release?

git fs
cd .git/fs/tags/v1.0.0/worktree
ohcount # A sloccount alternative

Display the latest html docs

git fs; cd .git/fs
firefox remotes/origin/html/worktree/index.html

Jump to a commit using its SHA1

git fs; cd .git/fs
cd commits/902f235378cb2b2f6dd5dd664b9630c95321f0ae

etc.

  • Restore from backup (bup, gibak)
  • Look at previous conffiles stored in etckeeper
  • Look at wiki pages stored by ikiwiki or gh-pages
  • Serve repository snapshots using a standard webserver.

Build instructions

git-fs depends on FUSE and some OCaml libraries. It has been tested on Debian, Ubuntu, and ArchLinux.

Get the dependencies:

sudo aptitude install omake libfuse-dev camlidl libpcre-ocaml-dev libbatteries-ocaml-dev  # Debian
sudo pacman -S omake ocamlfuse-cvs pcre-ocaml ocaml-batteries  # Arch
sudo yum install fuse-devel ocaml-pcre-devel ocaml-findlib-devel ocaml-camomile ocaml-camlidl ocaml-bisect ocaml-ounit ocaml-ocamldoc  # Fedora

Build:

git submodule update --init
make -C deps/ocamlfuse/lib || make -C deps/ocamlfuse/lib byte-code-library
omake

Install (~/bin must be in your path):

ln -s ~+/git-fs -t ~/bin

Usage

The first step is to mount the filesystem.

git fs

Then, either browse it

cd .git/fs/HEAD/worktree
cat README

Or use a few special commands

git fs mtab
git fs umount
git fs help

Debugging

MALLOC_CHECK_=3 debug/git-fs debug 2>&1 |tee -a debug.log

git-fs's People

Contributors

g2p avatar jcpunk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.