🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Git Basics: all 10 questions

Quiz: Git Basics · Question 10 of 10

A teammate pushed a .env file with an API key to GitHub. What must happen?

A teammate pushed a .env file with an API key to GitHub. What must happen?

  1. A.Nothing, if the repository is private
  2. B.Delete the file in the next commit and continue
  3. C.Treat the key as leaked and rotate it immediately, then stop tracking the file
  4. D.Rename the file to .env.old
Answer & explanation

Correct answer: Treat the key as leaked and rotate it immediately, then stop tracking the file

Once pushed, the secret is in the history and possibly in clones.

Can you get the rest right without peeking?

Take the timed Quiz: Git Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →