본문 바로가기

git

Git에 commit한 파일 기록 삭제하기

해당 파일이 기록된 커밋 강제로 삭제하기

 git filter-repo --path "lib/test copy.dart" --invert-paths  --force

 

이후 Github와 연결이 끊겼기 때문에 다시 연결해주기

git remote add origin https://github.com/your-username/your-repository.git

 

이후 강제로 푸시

git push origin --force

 

'git' 카테고리의 다른 글

Github에 업로드한 파일을 지워보자  (0) 2024.07.08