Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seamoonpandey/learning-to-destroy-secrets
learning git
https://github.com/seamoonpandey/learning-to-destroy-secrets
Last synced: 1 day ago
JSON representation
learning git
- Host: GitHub
- URL: https://github.com/seamoonpandey/learning-to-destroy-secrets
- Owner: seamoonpandey
- Created: 2024-11-02T15:13:23.000Z (16 days ago)
- Default Branch: main
- Last Pushed: 2024-11-02T15:31:40.000Z (16 days ago)
- Last Synced: 2024-11-02T16:24:09.987Z (16 days ago)
- Language: C
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Learning to destroy secrets
Sometimes we do some mistakes and commit secrets to our repositories. This is a simple guide to help you destroy secrets from your git history.
## Step 1: Identify the secrets
First of all, you need to identify the secrets that you want to destroy. This can be passwords, API keys, tokens, etc.
## Step 2: Remove the secrets
After identifying the secrets, you need to remove them from your code. This can be done by replacing the secrets with dummy values or by removing them completely.
```bash
git filter-repo --invert-paths --path 'secrets.txt'
# or if didn't work add --force
```
This will clear up all the commits where this file existed.
## Step 3: Setup the required environment with new variables and a new commit