Skip to content

Commit

Permalink
Remove statements that make no sense from sensitive data removal guid…
Browse files Browse the repository at this point in the history
…e (#53429)
  • Loading branch information
newren authored Dec 9, 2024
1 parent b5e07c2 commit db3b223
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil

> [!IMPORTANT] If the file with sensitive data used to exist at any other paths (because it was moved or renamed), you must run this command on those paths, as well.

1. Double-check that you've removed everything you wanted to from your repository's history, and that all of your branches are checked out.
1. Double-check that you've removed everything you wanted to from your repository's history.
1. The `git filter-repo` tool will automatically remove your configured remotes. Use the `git remote set-url` command to restore your remotes, replacing `OWNER` and `REPO` with your repository details. For more information, see "[AUTOTITLE](/get-started/getting-started-with-git/managing-remote-repositories#adding-a-remote-repository)."

```shell
git remote add origin https://github.com/OWNER/REPOSITORY.git
```

1. Once you're happy with the state of your repository, and you have set the appropriate remote, force-push your local changes to overwrite your repository on {% data variables.location.product_location %}, as well as all the branches you've pushed up. A force push is required to remove sensitive data from your commit history.
1. Once you're happy with the state of your repository, and you have set the appropriate remote, force-push your local changes to overwrite your repository on {% data variables.location.product_location %}. A force push is required to remove sensitive data from your commit history.
```shell
$ git push origin --force --all
Expand Down

0 comments on commit db3b223

Please sign in to comment.