VS Code wrapper for the BFG Repo-Cleaner to remove credentials from your git history.
- The Java Runtime Environment (Java 8 or above - BFG v1.12.16 was the last version to support Java 7, v1.12.3 was the last version to support Java 6)
- Before getting started, ensure your repository is backed up. It is also recommended to merge or close all open pull requests before removing files from your repository.
- Install the extension
- Open the command palette (Ctrl+Shift+P), type "Remove credentials from git history", press enter.
- Enter repo URL.
- Enter credential to remove.
Step by step walkthrough using the Command Palette to peform the following:
-
Clones a fresh copy of your repo using the --mirror flag.
-
Installs BFG: This step downloads the BFG jar file from the official repository and saves it in the workspace folder.
-
Enter credential to remove: This step prompts the user to enter the credential to remove, writes this credential to a file in the workspace folder, and uses the
--replace-text
option of BFG Repo-Cleaner to replace this credential with***REMOVED***
in the repository's history. -
Remove credentials: This step runs the BFG Repo-Cleaner with the
--replace-text
option to replace the specified credential with***REMOVED***
in the repository's history. -
Clean your repository: This step runs the
git reflog expire --expire=now --all && git gc --prune=now --aggressive
command to clean the repository. -
Push the changes: This step runs the
git push --force
command to push the changes to the remote repository.
- BFG Repo-Cleaner: https://rtyley.github.io/bfg-repo-cleaner
- GitHub: Removing sensitive data from a repository
Initial release
Set up CI with GitHub Actions
Show progress bar between git commands
Show feedback message to file GitHub Issue
Support repos that don't use post-fixed .git URLs