개미의 개열시미 프로그래밍

[Git] Large files detected 오류 해결하기 본문

Git

[Git] Large files detected 오류 해결하기

YunHyeok 2021. 1. 27. 18:00
728x90
반응형

인턴 과제를 마무리하고 pull request를 날려야하는 상황에 났던 오류이다..

내 원격저장소에 push를 하려는 순간

제발...

데이터셋을 모아둔 data폴더명을 dataset으로 변경을 해서 .gitignore에서 트랙킹을 못해 대용량 파일이 커밋이 되어버려 Large files detected오류가 발생했다.

git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch [대용량 파일명]'

 

위의 명령어를 입력을 하면 해당 파일의 캐쉬를 삭제가 되지만 강제로 캐쉬를 날려버리면 로컬과 원격 레포지토리의 commit history가 엉키게된다;;

 

push를 하면 pull을 하라고 hint를 준다.

push

하지만 git pull을 하면 아래처럼 충돌이난 기록을 보여준다.

이후로는 충돌난 부분을 일일히 수정해준 후 push를 진행하면 된다!

깔끔..

<참고한 사이트>

아래의 사이트에서 많은 도움을 받았다


https://dev-yeon.tistory.com/23

https://www.hanumoka.net/2019/01/24/git-20190124-git-error-Large-files-detected/

728x90
반응형

'Git' 카테고리의 다른 글

[Git] Git Bash에서 conda activate를 사용하고 싶을때  (6) 2021.07.09
[Git] git stash란?  (0) 2021.02.02
[Git] Commit message 규칙 정리  (0) 2021.01.20
Comments