Skip to content

Commit

Permalink
Update removing-sensitive-data-from-a-repository.md (#31760)
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Clark <[email protected]>
Co-authored-by: mc <[email protected]>
  • Loading branch information
3 people authored Mar 22, 2024
1 parent 50931e4 commit b5e1d50
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ There are a few simple tricks to avoid committing things you don't want committe
- Avoid the catch-all commands `git add .` and `git commit -a` on the command line—use `git add filename` and `git rm filename` to individually stage files, instead.
- Use `git add --interactive` to individually review and stage changes within each file.
- Use `git diff --cached` to review the changes that you have staged for commit. This is the exact diff that `git commit` will produce as long as you don't use the `-a` flag.
- Enable push protection for your repository to detect and prevent pushes which contain hardcoded secrets from being committed to your codebase. For more information, see "[AUTOTITLE](/code-security/secret-scanning/push-protection-for-repositories-and-organizations#about-push-protection-for-repositories-and-organizations)."
## Further reading
Expand Down

0 comments on commit b5e1d50

Please sign in to comment.