An engineer committed a production config by mistake, noticed an hour later, and deleted it in a follow-up commit. Problem solved, right?
A commit is immutable. Deleting a file in a later commit deletes nothing.
lua
$ git log --oneline
9b7d4e2 remove secrets, sorry
8c01e77 add healthcheck endpoint
3f2a1c9 add production configdiff
$ git show 3f2a1c9
diff --git a/config/prod.env b/config/prod.env
new file mode 100644
index 0000000..4c1f2ab
--- /dev/null
+++ b/config/prod.env
@@ -0,0 +1,4 @@
+APP_ENV=production
+DB_HOST=db1.corp.example
+VAULT_KEY=nullhaven{history_is_forever}
+LOG_LEVEL=warndiff
$ git show 9b7d4e2
-APP_ENV=production
-DB_HOST=db1.corp.example
-VAULT_KEY=***
-LOG_LEVEL=warn
+APP_ENV=production
+DB_HOST=db1.corp.example
+LOG_LEVEL=warnA commit is immutable. Deleting a file in a later commit deletes nothing.