From 060621c481400e3d3d2b9f49d07d1bdf4db0bbda Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 15 Apr 2026 22:11:15 -0700 Subject: [PATCH 1/3] chore: document agent commit identity in CLAUDE.md Co-Authored-By: Claude Code --- CLAUDE.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index cc20fe13..205a1524 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -166,6 +166,30 @@ nix.gc.dates = lib.mkForce "daily"; - After arriving at a working solution through trial and error, proactively ask whether the finding should be recorded in CLAUDE.md (or Basic Memory) for future sessions. +## Commit Identity + +When making git commits, always use a distinct agent identity and disable GPG signing (which requires an interactive passphrase and will hang): + +```bash +git commit \ + -c commit.gpgsign=false \ + -c user.name="Claude Code" \ + -c user.email="claude-code@noreply.anthropic.com" \ + -m "..." +``` + +This applies to all `git commit` invocations, including via `gt modify`. For `gt modify`, pass the `-c` flags via `GIT_CONFIG_COUNT` env vars or use `git commit` directly when amending: + +```bash +GIT_CONFIG_COUNT=3 \ + GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false \ + GIT_CONFIG_KEY_1=user.name GIT_CONFIG_VALUE_1="Claude Code" \ + GIT_CONFIG_KEY_2=user.email GIT_CONFIG_VALUE_2="claude-code@noreply.anthropic.com" \ + gt modify --no-edit +``` + +Commits made this way will appear as **Unverified** on GitHub, clearly distinguishing agent-authored commits from human-authored ones. + ## Code style - All files should end with a newline. From 1db126f6c34e77989256492fa2d0963ca148373d Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 15 Apr 2026 22:11:41 -0700 Subject: [PATCH 2/3] fixup: use GIT_CONFIG_COUNT form; -c and -m can't be combined Co-Authored-By: Claude Code --- CLAUDE.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 205a1524..a741721d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -168,17 +168,17 @@ nix.gc.dates = lib.mkForce "daily"; ## Commit Identity -When making git commits, always use a distinct agent identity and disable GPG signing (which requires an interactive passphrase and will hang): +When making git commits, always use a distinct agent identity and disable GPG signing (which requires an interactive passphrase and will hang). Use `GIT_CONFIG_COUNT` env vars — note that `-c` and `-m` cannot be used together in git: ```bash -git commit \ - -c commit.gpgsign=false \ - -c user.name="Claude Code" \ - -c user.email="claude-code@noreply.anthropic.com" \ - -m "..." +GIT_CONFIG_COUNT=3 \ + GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false \ + GIT_CONFIG_KEY_1=user.name GIT_CONFIG_VALUE_1="Claude Code" \ + GIT_CONFIG_KEY_2=user.email GIT_CONFIG_VALUE_2="claude-code@noreply.anthropic.com" \ + git commit -m "..." ``` -This applies to all `git commit` invocations, including via `gt modify`. For `gt modify`, pass the `-c` flags via `GIT_CONFIG_COUNT` env vars or use `git commit` directly when amending: +The same applies to `gt modify`: ```bash GIT_CONFIG_COUNT=3 \ From 85152273b1e36b0896a3a1230077946310072c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Wed, 15 Apr 2026 22:13:44 -0700 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20simplify=20commit=20identity=20ins?= =?UTF-8?q?tructions=20=E2=80=94=20signing=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Code --- CLAUDE.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a741721d..36fcdebb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -168,28 +168,22 @@ nix.gc.dates = lib.mkForce "daily"; ## Commit Identity -When making git commits, always use a distinct agent identity and disable GPG signing (which requires an interactive passphrase and will hang). Use `GIT_CONFIG_COUNT` env vars — note that `-c` and `-m` cannot be used together in git: +When making git commits, disable GPG signing — it requires an interactive passphrase and will hang. Agent authorship is already recorded via the `Co-Authored-By` trailer. Note that `-c` and `-m` cannot be used together in git; use `GIT_CONFIG_COUNT` env vars instead: ```bash -GIT_CONFIG_COUNT=3 \ +GIT_CONFIG_COUNT=1 \ GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false \ - GIT_CONFIG_KEY_1=user.name GIT_CONFIG_VALUE_1="Claude Code" \ - GIT_CONFIG_KEY_2=user.email GIT_CONFIG_VALUE_2="claude-code@noreply.anthropic.com" \ git commit -m "..." ``` The same applies to `gt modify`: ```bash -GIT_CONFIG_COUNT=3 \ +GIT_CONFIG_COUNT=1 \ GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false \ - GIT_CONFIG_KEY_1=user.name GIT_CONFIG_VALUE_1="Claude Code" \ - GIT_CONFIG_KEY_2=user.email GIT_CONFIG_VALUE_2="claude-code@noreply.anthropic.com" \ gt modify --no-edit ``` -Commits made this way will appear as **Unverified** on GitHub, clearly distinguishing agent-authored commits from human-authored ones. - ## Code style - All files should end with a newline.