Skip to content

Instantly share code, notes, and snippets.

@yokawasa
Last active April 4, 2026 05:31
Show Gist options
  • Select an option

  • Save yokawasa/d1296224074f45ecb11d87c970bd9fb0 to your computer and use it in GitHub Desktop.

Select an option

Save yokawasa/d1296224074f45ecb11d87c970bd9fb0 to your computer and use it in GitHub Desktop.
Co-authored with Claude Code の設定方法

Gitのコミットメッセージに Co-authored-by トレーラーを追加するだけ。

Co-authored-by: Claude <noreply@anthropic.com>

1. コミット時に手動で追加

git commit -m "feat: add feature

Co-authored-by: Claude <noreply@anthropic.com>"

2. Claude Code の設定 (Official)

Claude Codeのsettings.jsonattributionを設定する

{
  "attribution": {
    "commit": "Co-authored-by: Claude <noreply@anthropic.com>",
    "pr": "Generated with Claude Code"
  },
}
  • ユーザーレベル: ~/.claude/settings.json
  • プロジェクトレベル: .claude/settings.json
  • ローカル: .claude/settings.local.json

ref: Claude Codeの設定のattributionについて

3. git commit template を使う

# ~/.gitmessage
Co-authored-by: Claude <noreply@anthropic.com>
git config --local commit.template ~/.gitmessage

# Globalで設定する場合は --globalオプションを付与
# git config --global commit.template ~/.gitmessage

所感

公式手法をつかうのが一番

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment