Skip to content

Sign Off Commits

Garrison Bible Study uses the Developer Certificate of Origin (DCO) instead of a contributor license agreement. Each commit must include a Signed-off-by line in the message footer. Policy and context: CONTRIBUTING in the repository root.

The sign-off line uses your configured name and email. Use your real name and a reachable email (the same values you would put in Signed-off-by manually).

Terminal window
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

To set identity only for this repository, run the same commands without --global from the repo root.

Check the values Git will use:

Terminal window
git config user.name
git config user.email

Add -s (or --signoff) so Git appends the line for you:

Terminal window
git commit -s -m "Short description of the change"

The footer will look like:

Signed-off-by: Your Name <you@example.com>

The sign-off must always be your identity. You are certifying the commit under the DCO; do not put an AI assistant or bot name or email in Signed-off-by.

If an AI coding assistant materially helped write the change, you remain responsible for reviewing and signing off the commit. Add a Co-authored-by: trailer in the message footer (Git accepts multiple trailers):

Terminal window
git commit -s -m "$(cat <<'EOF'
Short description of the change
Co-authored-by: Assistant Name <assistant@example.com>
EOF
)"

Use the name and contact your project or editor documents for that assistant. The Signed-off-by line must still be your real name and email from Set your Git identity.

Enable sign-off by default so you do not have to pass -s every time:

Terminal window
git config --global commit.signoff true

For only the Garrison Bible Study clone:

Terminal window
git config commit.signoff true

With commit.signoff enabled, a plain git commit -m "..." still adds the Signed-off-by line.

Terminal window
git log -1 --format=full

Confirm the message ends with Signed-off-by: Your Name <you@example.com>.

Last commit only (not yet pushed, or you are okay rewriting history on your branch):

Terminal window
git commit --amend -s --no-edit

Several commits on a branch (for example before opening a merge request), rebase and amend each commit:

Terminal window
git rebase HEAD~3 --exec 'git commit --amend -s --no-edit'

Replace 3 with the number of commits to fix. Resolve any conflicts, then continue the rebase as usual.

Sign off every commit on the branch, not only the latest. Merge requests that lack sign-offs on one or more commits may be asked to amend or rebase before merge.

  • Git setup — install bin/install-git-hooks and pre-commit checks (Pint, ESLint, Prettier, TypeScript).