This guide will show you everything you need to do, in order to contribute a project. It is primarily oriented towards users of Unix or Unix-like operating systems, but I tested it on Windows running Git bash and it worked just fine.

  1. SSH setup
  2. Git setup
  3. Contributing to a project
  4. FAQ

SSH setup

Contributors perform clone and push to the server using ssh key. The key has to be ed25519 type in RFC 4716 format. You can generate one with this command:

ssh-keygen -t ed25519_git_dpolakovic_space -C "your.email@example.com"

Use email address which you will add later in your git config.

Privacy note: this email address won't be visible in log and shortlog.

Use long passphrase and store your keys securely. If you use older ssh package, you might end up with key in Open SSH format. In that case, convert the public key into desired format with command:

ssh-keygen -e -f ~/.ssh/ed25519_git_dpolakovic_space.pub -m RFC4716

Copy the newly generated/converted public ssh key contents into an email. With it, name projects you want to contribute to, so I can add you correct access rights. As soon as I reply to your email, you can start contributing.

In meantime, you can modify your ssh config file.

nano ~/.ssh/config

Note: you can actually use any text editor you prefer, I put nano here because it's default editor in Windows Git bash and it's favorite editor of my good friend Jakub.

Add these lines:

Host git.dpolakovic.space HostName git.dpolakovic.space User git Port 1388 IdentityFile ~/.ssh/ed25519_git_dpolakovic_space IdentitiesOnly yes


Git setup

If you haven't setup your global git config name and email, it's good time to set it up now. Please use the email you entered for ssh-keygen before:

git config user.name --global "Your Name" git config user.email --global "your.email@example.com"

Or set it up for project only. To do so, cd into the cloned cloned project and leave the --global handle:

git config user.name "Your Name" git config user.email "your.email@example.com"

Note: if your email has gravatar account, your gravatar profile picture will be visible on this server too.


Contributing to a project

You can clone projects using this command structure:

git clone git@git.dpolakovic.space:<project-name>

Note: you can test your setup on "testing" repository.

Enter the directory and create your branch.

git checkout -b "my-feature-branch"

Now you are ready to perform changes. Commit often and according to the server rules. Before pushing your changes, check if no changes happened on master branch during your dev time.

git checkout master git pull origin master git checkout my-feature-branch git merge master

Note: if merging changes this way seems to be too much work for your usecase, you may try rebasing instead.

When you finish resolving differences, don't forget to commit again. Now, you are ready to push your changes.

git push origin my-feature-branch

If it's your first time pushing this feature branch, you may want to add -u flag, so you won't have to declare the branch name in future push commands. This is fully optional.

git push -u origin my-feature-branch

You will be prompted to enter your ssh key passphrase. Submit it and your changes are up! If your work is done, you can ask for merging the feature branch with master via email.

For more git commands reffer to this cheat sheet or git documentation.


FAQ

Q: How can I leave the server?
A: Just send me an email with this request and I will delete your ssh key.

Q: Can I become a collaborator?
A: Sadly no.

Q: Could you mirror a project on different git server?
A: Yes. I preffer codeberg or notabug.org, but I am willing to mirror on other places too, if you wish so.

Q: Can I host my own project on this server?
A: Well, generally no, but it depends on the project. Since it's unusual request, send me an email.