[BUG] Claude Code incorrectly adds attribution to git commits despite explicit project instructions not to

Resolved 💬 4 comments Opened Sep 11, 2025 by jodyshapiro Closed Sep 11, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Summary:Claude Code automatically adds attribution (Co-Authored-By: Claude <noreply@anthropic.com>) to all git commits, even when project documentation explicitly
instructs NOT to add such attribution.

Current Behavior:When creating git commits, Claude Code always appends:
🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>

What Should Happen?

Expected Behavior:Claude Code should respect project-specific git commit standards and NOT add attribution when instructed.

Error Messages/Logs

Steps to Reproduce

  1. Create a CLAUDE.md file in project root with the following content:

### Git Commit Standards
Use this format for commit messages:
Brief description of changes (50 chars max)

Detailed explanation of what changed and why:

  • Specific improvements made
  • Design system patterns followed
  • UX issues resolved

DO NOT put this in the commit message

  1. Make changes to project files
  2. Ask Claude Code: "Create a git commit for these changes"
  3. Actual Result: Claude Code adds attribution despite instructions

git commit -m "fix: Resolve critical issues

[commit message body]

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>"

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.0.111 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Impact:

  • Violates team/project standards - Many projects have strict commit message guidelines
  • Clutters git history - Unnecessary metadata in every commit
  • Professional concerns - Some organizations prohibit AI attribution in commits
  • Inconsistent history - Mixed attribution when some commits are manual
  • CI/CD issues - Some automated tools may fail on non-standard commit formats

Environment:

  • Claude Code version: Latest (as of January 2025)
  • Project has CLAUDE.md with explicit commit standards
  • Occurs consistently across all commit types (feat, fix, refactor, etc.)

Suggested Solution:

Claude Code should:

  1. Check for project commit standards in (priority order):
  • .claude/settings.json
  • CLAUDE.md
  • .gitmessage
  • CONTRIBUTING.md
  1. Parse for attribution rules - Look for patterns like:
  • "DO NOT put this in the commit message"
  • "no attribution"
  • "no AI attribution"
  • "clean commits"
  1. Default behavior change:
  • Only add attribution if explicitly requested by user
  • Or if project docs specifically allow it
  • Otherwise, create clean commits
  1. Add configuration option:

// .claude/settings.json
{
"git": {
"addAttribution": false
}
}

Additional Context:

This issue was discovered when Claude Code created multiple commits with attribution despite the project's CLAUDE.md file explicitly stating "DO NOT put this in
the commit message" in the Git Commit Standards section.

The attribution adds no functional value and actively violates documented project standards. Professional software projects need clean, standardized commit
messages for maintainability.

Workaround:

Currently, users must manually amend commits to remove attribution:
git commit --amend
# Then manually remove the attribution lines

---
Labels suggested: bug, git, configuration, standards-compliance

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗