You have found a working instance of GitRoot, but you don’t know how to create a repository or participate in an existing repository, this tutorial is for you.
In this tutorial we use yourDomainName.yourTLD
as instance. Meaning that http connexion is served under 80
port and 22
for ssh.
This tutorial has 2 parts create a repository and use a repository
In GitRoot all is stored in git. Even the repositories hosted on the instance. You need to clone the root
repository to discover repositories or to add a new one: git clone ssh://yourDomainName.yourTLD/ && cd yourDomainName.yourTLD
.
As always in GitRoot you need to Configure your local git client by running .gitroot/init.sh
.
Don’t want to run unknown sh? See manually init client.
In the root
repository open .gitroot/repositories.yml
and add:
1 root:
2 kind: normal
3 defaultbranch: main
4+ repo1:
5+ defaultbranch: main
Like you are not the owner of the instance, you need to create a branch: git checkout -b addMyRepo1
.
Commit and push: git add . && git commit -m "add repo1 repository" && git push
.
By default GitRoot use main
has defaultBranch but you can put every name you like.
If your instance use the grafter plugin, you’ll need to pull changes git pull origin addMyRepo1
, and if a file named grafts/addMyRepo1.md
appear, you need to review it and follow their instructions.
When the instance owner merge your branch in the default one you will be able to clone and use your new repository, don’t forget to init your local git config: git clone ssh://yourDomainName.yourTLD/repo1 && cd repo1 && .gitroot/init.sh
To delete a repository see delete repository
GitRoot has configured your repository with all plugins available on the instance. But GitRoot has not activated them, it’s up to you to use them or not.
If you wnat to active them you can turn active: false
to active: true
in the .gitroot/plugins.yml
. Don’t forget to look/edit default configuration.
1 url: "file:///plugins/ladybug/ladybug-0.0.1.wasm"
2 crc32: null
3 name: ladybug
4- active: false
5+ active: true
6 run:
7 - path: issues/**/*.md
For more details on plugins rights read the documentation.
You have find a good repository where you want to contrinute? In GitRoot it’s super easy, no need to register, no need to anything except your old git friend.
Enter git clone ssh://yourDomainName.yourTLD/repo1 && cd repo1 && .gitroot/init.sh
.
Don’t want to run unknown sh? See manually init client.
After that, you can make a branch git checkout -b myBranch
and start contributing. When you are happy with the changes, commit and push them git add . && git commit -m "my changes" && git push
, GitRoot will handle all the rest.
If your instance use the grafter plugin, you’ll need to pull changes git pull
, and if a file named grafts/myBranch.md
appear, you need to review it and follow their instructions. A graft in GitRoot is like a (merge/pull)-request in other forges. But as always with GitRoot all is managed through git.