Git
Git is a version control system used by I2P, replacing the previous system Monotone in late 2020.[1]
Usage & tips
Telling Git to use I2P
To use HTTP/Git-based I2P servers, Git's proxy settings must be configured. This can be achieved by adding these lines to your ~/.gitconfig
(create if necessary):
[http] proxy = http://127.0.0.1:4444 [https] proxy = http://127.0.0.1:4444 [git] proxy = http://127.0.0.1:4444
If the proxy is needed for only a few repos, one can also utilize the -c
of Git:
git -c http.proxy=http://127.0.0.1:4444 clone http://example.i2p/myrepo.git
Note that this method doesn't store the proxy information within the repo configuration, so the same -c http.proxy=...
settings must be applied on each invocation.
Limit fetched commits
Git (by default) fetches the full history of a repo, which can be hard for I2P connections to sustain. Git provides the --depth=N
argument to only fetch N commits from the top:
git clone --depth=1 http://git.idk.i2p/i2p-hackers/i2p.i2p.git
The repository can then (step-by-step if needed) be unshallowed by git pull --deepen=N
.
Hide timezone
Git shows the local timezone in commits. You might want to change that to something more generic, such as UTC.
git commit --date="`date --utc +%Y-%m-%dT%H:%M:%S%z`" -m "added new feature"
Servers
Main page: Eepsite/Services#Code
There are several Git services within I2P.
Name | AH/B32 | Description |
---|---|---|
git.idk.i2p | AH B32 | idk's GitLab service, hosts I2P's code |
git.community.i2p | AH B32 | Gitea based Git hosting |
Setup guides
- In-Network: http://i2p-projekt.i2p/en/docs/applications/git - Git over I2P for users
- Clearnet: https://geti2p.net/en/docs/applications/git - Git over I2P for users