Mention remotes need resetting on removing-sensitive-data-from-a-repository.md (#43793)
Co-authored-by: Steve Guntrip <stevecat@github.com>
This commit is contained in:
@@ -142,7 +142,13 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil
|
||||
```
|
||||
|
||||
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. Once you're happy with the state of your repository, force-push your local changes to overwrite your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, as well as all the branches you've pushed up. A force push is required to remove sensitive data from your commit 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 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, as well as all the branches you've pushed up. A force push is required to remove sensitive data from your commit history.
|
||||
|
||||
```shell
|
||||
$ git push origin --force --all
|
||||
|
||||
Reference in New Issue
Block a user