Skip to content

Commit c6d4ae9

Browse files
authored
Add preparation steps for sensitive data removal
Add preparation steps for sensitive data removal
1 parent a3e84a1 commit c6d4ae9

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

content/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,18 @@ If the commit that introduced the sensitive data exists in any forks, it will co
6363

6464
Consider these limitations and challenges in your decision to rewrite your repository's history.
6565

66+
## Before you begin
67+
68+
Before rewriting your repository's history, prepare for the cleanup and coordinate with anyone who might be affected.
69+
70+
* Revoke or rotate any exposed secrets before you rewrite history. Rewriting history removes the secret from some locations, but it does not prevent anyone who already saw the secret from using it.
71+
* Identify every path or text value that needs to be removed. If the sensitive data moved between files or changed names, include each path or value in your cleanup plan.
72+
* Ask collaborators to pause work on affected branches until the cleanup is complete. New commits pushed during the cleanup can require you to repeat the process.
73+
* Check whether branch protections, tags, pull requests, or forks still reference the commit that introduced the sensitive data. These references can prevent the data from being fully removed.
74+
6675
## Purging a file from your local repository's history using git-filter-repo
6776

68-
1. Install the latest release of [the `git-filter-repo` tool](https://github.com/newren/git-filter-repo). You need a version with the `--sensitive-data-removal` flag, meaning at least version 2.47. You can install `git-filter-repo` manually or by using a package manager. For example, to install the tool with HomeBrew, use the `brew install` command.
77+
1. Install the latest release of [the `git-filter-repo` tool](https://github.com/newren/git-filter-repo). You need a version with the `--sensitive-data-removal` flag, meaning at least version 2.47. You can install `git-filter-repo` manually or by using a package manager. For example, to install the tool with Homebrew, use the `brew install` command.
6978

7079
```shell
7180
brew install git-filter-repo

0 commit comments

Comments
 (0)