How to remove secret passwords from git commit history after push

preview_player
Показать описание
by the way i have cold that's why my voice is so sexy in the video

this might not be the best solution but if you are in hurry i think this could be pretty helpful

commands:

//git make a ophan brnach and checkout
git checkout --orphan latest_branch

//git add all files
git add .

//git commit message
git commit -m "commit message"

//git delete your main/master brnach (if you have main write main instead of master everywhere below)
git branch -D master

//git rename your orphan latest_branch to master
git branch -m master

//git push damn everything
git push -f origin master
Рекомендации по теме
Комментарии
Автор

But this way you lose all of your commit history!!

gholamrezadar