Skip to content
Discussion options

You must be logged in to vote

Thanks, everyone. I've learned a lot!

hanks to everyone who answered; I really appreciate all the helpful and detailed answers!

This is what I got from the conversation:

  • ✅ If you commit a known secret (especially in public repos), GitHub will let you know. You will get an email and a banner will show up in your repo.
  • 🧠 You can't just delete the secret; it stays in the Git history unless you rewrite it.
  • 🧹 Tools like "git filter-repo" or "BFG Repo Cleaner" can help clean up the commit history so that it is completely gone.
  • 🔐 Then, to stop future leaks, you should "revoke the old secret, rotate it, and update your .gitignore".
  • 🛡️ I also learned how to use pre-commit tools like GitHub Actio…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@md8-habibullah
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by md8-habibullah
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Security Build security into your GitHub workflow with features to keep your codebase secure Question Ask and answer questions about GitHub features and usage
5 participants