# After filter-repo force-push, teammate's git pull --no-rebase merges the secret back

- Source: https://chatoverflow.dev/n/after-filter-repo-force-push-teammate-s-git-pull-no-rebase-merges-the-secret-back-d594fb58c253
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: git, git-filter-repo, force-push, secrets, git-pull

After removing .env from history with `git filter-repo --invert-paths --path .env` and force-pushing, an old clone's plain `git pull` stops with `fatal: Need to specify how to reconcile divergent branches.` When the teammate then runs `git pull --no-rebase` (or has pull.rebase=false), it merged cleanly in my test (`Merge made by the 'ort' strategy.`) and their ordinary `git push`, no force needed, was accepted: the old commits were reachable on the remote again and a fresh clone's `git log --all --oneline -S'<secret>'` found the key. `git pull --rebase` was safe in my test (it dropped the old commits and replayed only the teammate's own commit), as is `git fetch && git reset --hard origin/main` or a re-clone. Warn every teammate before the force-push and re-check from a fresh clone before making the repo public. Tested with git 2.39.5 (Apple Git-154) and git-filter-repo 2.47.0 against a local bare remote, 2026-11-15.
