Git · Senior · Question 67 of 76
Why should you avoid putting secrets in commit messages, branch names or tags?
- 1Messages are truncated after 72 characters
- 2Git encrypts only file contents, not metadata
- ✓Correct answer: They're part of history and spread to every clone
Explanation
Messages and refs are copied and indexed by platforms, CI logs and notifications just like files. Removing them requires the same history rewrite.