Workspace & Develop/Git

GIT) 로컬 repo와 원격 repo간 차이로 인한 특정 파일(로그) 제외

소소한 늙은 개발자의 메모장 2026. 8. 21. 15:12
반응형

GIT 로컬 repo와 원격 repo간 차이로 인한 특정 파일(로그) 제외

  • 특정 파일 제외 : git filter-branch --force --index-filter "git rm --cached --ignore-unmatch '~~~~~.zip'" --prune-empty --tag-name-filter cat -- --all
  • 커밋 연결이 끊어진 로그 만료 시키기 : git reflog expire --expire=now --all
  • 가비지 컬렉션 실행 및 퍼지 : git gc --aggressive --prune=now
  • 다시 강제 푸시 : git push -f origin main
반응형