GitRoot
GitRoot is a tiny yet powerfull git forge. Download one binary, launch it and you have a forge. Install plugins and only your imagination is the limit.
Getting Started
These instructions will give you a copy of the project up and running on your local machine for development and testing purposes. See gitroot.dev to understand the project itself and the documentation to discover how to use it.
Prerequisites
All this tools need to be available in your path:
- git: the git client to be able to pull and push code
- bash: a lot of scripts are written to be executed in bash
Then you have two choices:
- mise: a dev env manager in which a simple
mise installwill set all requierements
Or install manually (look into mise.toml for forgotten tools):
- make: to simplify the call to the scripts we have a makefile in the root directory and some others in sub-directories
- golang: GitRoot is written in go see rationals if you want to know why
- tinygo: first plugins are written in golang and compiled thanks to tinygo, in the future a lot of others languages will comes
- nodejs/npm: to compile plugin in assemblyscript
- rust: to compile plugin in rust
Installing
Clone the code git clone ssh://gitroot.dev/ and init your git client for this repository .gitroot/init.sh (because we use the stigma plugin).
Don’t want to run unknown sh? See manually init client.
Don’t forget to make a branch before coding git checkout -b myWork. As GitRoot allow anybody to push a branch (if no one as already do == a branch name need to be unique) you don’t need to register or to fork something. Branch, code, commit and push, is what you need to do.
More on the users and branches workflow in GitRoot.
Build
To build GitRoot use make build and it will generate a gitroot binary in the root of the project.
Launch it with ./gitroot -data="./data", your forge is accessible on git clone ssh://127.0.0.1:4545/ or by opening http://127.0.0.1:4546/.
For more details on usage, please read the doc.
Running the tests
GitRoot has differents kind of tests:
- unit tests in go files, execute them with
make test - integration tests in sh files, they will create data directory in
/tmp, execute them withmake testsuite
To run all in one command: make testall
Deployment
See the documentation to deploy an instance.
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting code to us.
Versioning
We use Semantic Versioning for versioning. For the versions available, see the changelog.
Authors
As in any GitRoot repository, find contributors in .gitroot/users.yml.
Release
To release a version of GitRoot:
- make the directory for issues
mkdir issues/close/v0.1.0 - move all issues from
issues/closetoissues/close/v0.1.0withfind issues/close/. -maxdepth 1 \( ! -type d \) -exec sh -c 'mv "$@" issues/close/v0.1.0' _ {} \; - update changelog with date, version, next and last
- commit
git add . && git commit -m ":bookmark: v0.1.0" - create a tag:
git tag -a 0.1.0 -m "Version 0.1.0" - build the binary:
mise release - get binary infos:
./releases/0.1.0/gitroot-0.1.0-darwin-amd64 --version - update changelog with commit info and add next section
- commit
git add . && git commit -m ":sparkles: start next" - release binary:
scp gitroot-0.1.0 gitroot.devand update lastssh gitroot.dev "rm -f gitroot-last && cp gitroot-0.1.0 gitroot-last" - git push (don’t push tag we don’t care about that, only commit is important)
License
This project is licensed under multiple licences. GitRoot follow spdx convention, so you can find all licences in licences directory. Each file contain it’s own licence, but here is a brief summary as of May 2025:
- app/server: EUPL-1.2
- app/libs: MIT
- app/plugin: EUPL-1.2
- doc: CC-BY-SA-4.0
So you can develop a plugin in any licence you want. To encourage that, libs to help you build a plugin are MIT. All the code EUPL will stay EUPL and any modification should be republied. See more on rationals about EUPL.
For more accurate information, check the REUSE.toml and/or individual files.