실수로 Secret Key를 안 빼두고 Github에 push 했덩;;
부랴부랴 .env로 Secret key들을 환경변수로 빼놓았으나,
from decouple import config
client_id = config('client_id')
Secret_Key = config('Secret_Key')
Github의 Commit내역에 남아있는 Secret key들은 그대로...
git filter-branch 로 해결 가능했덩.
git filter-branch --force --tree-filter "sed -i '' 's/7ong/***REMOVED***/' file.py"
내 repo의 file.py에 있는 "7ong"을 전부 "***REMOVED***"로 바꿔주는 마법~!
과거 commit 에 남아있는 기록들까지 전부 바꿔준덩.
--force 없이 해당 command를 여러 번 사용한다면,
Cannot create a new backup.
A previous backup already exists in refs/original/
Force overwriting the backup with -f
요런 error code가 뜨게 됩니덩;
마지막으로 force push 해주는 것 잊지마렁!!
git filter-branch --force --tree-filter "sed -i '' 's/[A]/[B]/' file.py"
git push --force
~끗~