]> git.proxmox.com Git - libgit2.git/blame - README.md
libgit2 v0.13.0 "Watermelon Wheat"
[libgit2.git] / README.md
CommitLineData
4b7483a2 1libgit2 - the Git linkable library
c5b97d5a 2======================
4b7483a2
SC
3
4libgit2 is a portable, pure C implementation of the Git core methods provided as a
5re-entrant linkable library with a solid API, allowing you to write native
6speed custom Git applications in any language with bindings.
7
b760fbf5
VM
8libgit2 is licensed under a **very permissive license** (GPLv2 with a special Linking Exception).
9This basically means that you can link it (unmodified) with any kind of software without having to
10release its source code.
11
12* Mailing list: <libgit2@librelist.org>
e0d9e12e 13* Website: <http://libgit2.github.com>
e49020e0 14* API documentation: <http://libgit2.github.com/libgit2>
e0d9e12e 15* Usage guide: <http://libgit2.github.com/api.html>
4b7483a2
SC
16
17What It Can Do
18==================================
19
20libgit2 is already very usable.
c5b97d5a 21
b760fbf5 22* SHA conversions, formatting and shortening
7548b8af
VM
23* abstracked ODB backend system
24* commit, tag, tree and blob parsing, editing, and write-back
4b7483a2 25* tree traversal
b760fbf5
VM
26* revision walking
27* index file (staging area) manipulation
b760fbf5 28* reference management (including packed references)
7548b8af
VM
29* config file management
30* high level repository management
31* thread safety and reentrancy
32* descriptive and detailed error messages
33* ...and more (over 175 different API calls)
b760fbf5 34
7548b8af
VM
35Building libgit2 - Using CMake
36==============================
ec821ca6 37
bbcc7ffc 38libgit2 builds cleanly on most platforms without any external dependencies.
8087bb93 39Under Unix-like systems, like Linux, * BSD and Mac OS X, libgit2 expects `pthreads` to be available;
bbcc7ffc
VM
40they should be installed by default on all systems. Under Windows, libgit2 uses the native Windows API
41for threading.
42
7548b8af 43The libgit2 library is built using CMake 2.6+ (<http://www.cmake.org>) on all platforms.
4b7483a2 44
e0d9e12e 45On most systems you can build the library using the following commands
4b7483a2 46
e0d9e12e
VM
47 $ mkdir build && cd build
48 $ cmake ..
49 $ cmake --build .
c5b97d5a 50
e0d9e12e
VM
51Alternatively you can point the CMake GUI tool to the CMakeLists.txt file and generate platform specific build project or IDE workspace.
52
53To install the library you can specify the install prefix by setting:
4b7483a2 54
e0d9e12e
VM
55 $ cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix
56 $ cmake --build . --target install
4b7483a2 57
e0d9e12e 58For more advanced use or questions about CMake please read <http://www.cmake.org/Wiki/CMake_FAQ>.
c5b97d5a 59
7548b8af
VM
60The following CMake variables are declared:
61
62- `INSTALL_BIN`: Where to install binaries to.
63- `INSTALL_LIB`: Where to install libraries to.
64- `INSTALL_INC`: Where to install headers to.
f0890fcc 65- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
7548b8af
VM
66- `BUILD_TESTS`: Build the libgit2 test suite (defaults to ON)
67- `THREADSAFE`: Build libgit2 with threading support (defaults to OFF)
c5b97d5a 68
e0d9e12e
VM
69Language Bindings
70==================================
4b7483a2 71
e0d9e12e 72Here are the bindings to libgit2 that are currently available:
4b7483a2 73
e0d9e12e 74* Rugged (Ruby bindings) <https://github.com/libgit2/rugged>
74bcb63f 75* objective-git (Objective-C bindings) <https://github.com/libgit2/objective-git>
b760fbf5
VM
76* pygit2 (Python bindings) <https://github.com/libgit2/pygit2>
77* libgit2sharp (.NET bindings) <https://github.com/libgit2/libgit2sharp>
78* php-git (PHP bindings) <https://github.com/libgit2/php-git>
79* luagit2 (Lua bindings) <https://github.com/libgit2/luagit2>
80* GitForDelphi (Delphi bindings) <https://github.com/libgit2/GitForDelphi>
81* node-gitteh (Node.js bindings) <https://github.com/libgit2/node-gitteh>
11a203e1 82* nodegit (Node.js bindings) <https://github.com/tbranyen/nodegit>
f3cf7f6d 83* go-git (Go bindings) <https://github.com/str1ngs/go-git>
b760fbf5 84* libqgit2 (C++ QT bindings) <https://projects.kde.org/projects/playground/libs/libqgit2/>
08db1efd 85* libgit2-ocaml (ocaml bindings) <https://github.com/burdges/libgit2-ocaml>
e0d9e12e 86* Geef (Erlang bindings) <https://github.com/schacon/geef>
7548b8af 87* libgit2net (.NET bindings, low level) <https://github.com/txdv/libgit2net>
4b7483a2
SC
88
89If you start another language binding to libgit2, please let us know so
90we can add it to the list.
91
c5b97d5a
SC
92How Can I Contribute
93==================================
94
95Fork libgit2/libgit2 on GitHub, add your improvement, push it to a branch
96in your fork named for the topic, send a pull request.
97
98You can also file bugs or feature requests under the libgit2 project on
99GitHub, or join us on the mailing list by sending an email to:
100
101libgit2@librelist.com
102
103
4b7483a2
SC
104License
105==================================
e0d9e12e 106libgit2 is under GPL2 **with linking exemption**. This means you
4b7483a2
SC
107can link to the library with any program, commercial, open source or
108other. However, you cannot modify libgit2 and distribute it without
109supplying the source.
110
111See the COPYING file for the full license text.