Reinvention of git
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
c_samples
cmd fix indent Sep 10, 2015
manualtest -pを先にテストする Apr 14, 2014
t rename test scripts Jun 27, 2014
zlib_git remove comments Sep 9, 2015
.gitignore ignore tmp dir Sep 8, 2015
Makefile add -lcrypto on compile Sep 8, 2015
README.md improve title Aug 23, 2015
TODO.md move comments Apr 23, 2014
cache.h separete header files Apr 20, 2014
minigit.c fix memory violation Sep 10, 2015
minigit.h fix indent Sep 10, 2015
sha1.c fix indent Sep 10, 2015
time.c fix indent Sep 10, 2015
zlib.c fix indent Sep 10, 2015

README.md

minigit - a minimal implementation of git.

This project is designed for education of git internals.

INSTALLATION

git clone git://github.com/DQNEO/minigit.git
cd minigit
make

MOTIVATION

git is a huge software, but the internal concept and data structure are very simple.

So I thought we can easily re-invent git command by the C language.

Usage

cat-file

# same as git
minigit cat-file -t .git/objects/00/0298c2ba808350e498c4b4149b02b42c47cecd
minigit cat-file -s .git/objects/00/0298c2ba808350e498c4b4149b02b42c47cecd
minigit cat-file -p .git/objects/00/0298c2ba808350e498c4b4149b02b42c47cecd

# you can pass any loose object file
minigit cat-file -t 000298
minigit cat-file -s 000298
minigit cat-file -p 000298

objectfile can be a commit, tree , or blob.

log

minigit log

ls-files

minigit ls-files
minigit ls-files --stage

Run test

make test
or
prove -r t

How to get arbitrary loose object files

you can get as many loose objects as you like by git unpack-objects :)

http://qiita.com/DQNEO/items/b6cb03c60b510dd3c934

AUTHOR

DQNEO

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as git itself.

SEE ALSO

https://github.com/git/git