Git · Junior · Question 61 of 75

Which file is a bad idea to commit to a Git repository?

Explanation

Secrets in Git spread to every clone and stay in history. Commit a .env.example with placeholder values and keep real secrets in a vault or the CI settings.

Further reading

Problem with a question

Git · Junior · question 61

Test yourself

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

Take this quiz