0

I ran git filter-repo on a repository to remove some secrets using the --replace-text flag.

I admit I don't understand the tool completely, and found out after I pushed the changes to remote (gitlab) that none of the replacements are present on the original commits SHAs.

When I checked for the changes in local again, I see the changes/text removal using git show <SHA-1> with the ref as (replaced), and the updates to the original commits were made in identical commits SHAs under refs/replace .

I read the git-filter-repo and git-replace documentation but the info there was pretty dense.

I did come across git-filter-repo's --replace-refs delete-no-add flag after, and realized that might've helped me before.

So now, what is the best way to overwrite the original git history with refs from refs/replace/?

Thanks in advance.

0 Answers0