Getting started with GitHub

GitHub Quickstart Guide

How to more easily split up a PRs into smaller pieces

Stacked Git provides an easier workflow than standard git rebase alone.

How to configure your GitHub for IOHK

If you already have a personal GitHub account, you don’t need to make a new account just for IOHK. It’s possible to achieve a satisfactory arrangement by tweaking a few settings in GitHub and git.

  • Ensure that you have added as an additional e-mail address of your GitHub account.
  • In your GitHub Notifications Settings, scroll down to the Custom routing section, and ensure that the input-output-hk org directs to This will also have the effect of attributing GitHub-authored commits in IOHK repos to your IOHK e-mail address, rather than your personal e-mail address.
  • The GPG key which you use for signing commits as should be added to your GitHub GPG Keys list.
  • GitHub supports MFA with YubiKeys - please use that rather than TOTP or phone-based authenticator apps.

How to configure your git for IOHK

Here are some tips you can try.

Make a separate config file for IOHK

Your global git config is in ~/.config/git/config and looks something like this:

	email = ""
	name = "My Name"

[includeIf "gitdir:~/iohk/"]
	path = "~/.config/git/iohk.config"

And then the IOHK-specific settings you put into ~/.config/git/iohk.config, like this:

    gpgSign = true

    email = ""
    signingKey = "763208E1F43EDBDA1D87A632CFD319FB4C00B5C2"

Then any git repo you have cloned under ~/iohk will receive IOHK-specific settings.

More useful merge conflict cookies

	conflictstyle = "diff3"

Prevent accidental pushes to master

Put the following into ~/iohk/

#!/usr/bin/env bash


while read local_ref local_oid remote_ref remote_oid
    if [ "$remote" = origin -a "$remote_ref" = refs/heads/master ]; then
        if [ -z "$PUSH_MASTER" ]; then
            echo >&2 "$0 prevents accidental pushes to origin/master."
            echo >&2 "Set the PUSH_MASTER environment variable and try again."
            exit 1
            echo >&2 "Using PUSH_MASTER setting to push..."

exit 0

Then enable this hook for any repo which you would like to protect from accidents. For example:

$ chmod 755 ~/iohk/
$ ln -vsf !$ ~/iohk/cw/cardano-wallet.git/hooks/

To bypass protection, you do this:

$ PUSH_MASTER=1 git push origin master

Emacs Magit

Emacs Magit is highly recommended. Also magit-forge can be helpful.

Links to this page