使用 git filter-branch 删除的文件在推送和拉回后重新出现

Files deleted with git filter-branch reappear after push and pull back

我在存储库中有一些敏感信息。尝试对其进行清理,然后推送到 GitLab。然而,一旦从 GitLab 中拉出,经过清理的信息就会重新出现。我的错误在哪里?

git log -Smypassword

<returns some commits showing that mypassword is indeed in the repo>

# clean the repo from mypassword
git filter-branch -f --tree-filter "find . -name '*.js' -exec sed -i -e 's/mypassword/nomorepassword/g' {} \;"^C

git log -Smypassword
<nothing found, indicating that git filter-branch worked>

git remote add origin git@gitlab.com:user/project.git

# I have two unmerged branches
git push -u origin master
git push -u origin accounts

cd ../fresh

git clone  git@gitlab.com:user/project.git

git log -Smypassword

<returns some commits again> 

我做错了什么?

我将另一个分支合并到master中并重做了。现在工作。无法判断这是我的错误,还是两个分支与它有关。