Git · Senior · Question 67 of 76

Why should you avoid putting secrets in commit messages, branch names or tags?

Explanation

Messages and refs are copied and indexed by platforms, CI logs and notifications just like files. Removing them requires the same history rewrite.

Further reading

Problem with a question

Git · Senior · question 67

Test yourself

Take the Git · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz