Skip to content

Instantly share code, notes, and snippets.

@dx7
Last active December 14, 2015 16:59
Show Gist options
  • Save dx7/5119553 to your computer and use it in GitHub Desktop.
Save dx7/5119553 to your computer and use it in GitHub Desktop.
Busca e troca sua senha e token em todo o histórico do repositório git. Útil quando vc faz commit com dados sensíveis e precisa abrir o repositório.
git filter-branch -f --tree-filter "find . -type f -exec sed -e s/your-plain-password/some-string/ -e s/\'your-plain-token\'/ENV[\'ENVIRONMENT_VARIABLE_TOKEN\']/ -i '' {} \;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment