231220 개발일지 TIL - failed to push some refs to 'https://gitlab.com/project.git'

The Web On Everything·2023년 12월 20일
0

개발일지

목록 보기
224/269
dev@ui-MacBook project % git commit -m "file update"
On branch dev.shj
Your branch is ahead of 'origin/dev.shj' by 5 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
dev@ui-MacBook project % git push origin dev.shj    
Enumerating objects: 1477, done.
Counting objects: 100% (1477/1477), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1096/1096), done.
Writing objects: 100% (1411/1411), 132.60 MiB | 7.78 MiB/s, done.
Total 1411 (delta 141), reused 1378 (delta 116), pack-reused 0
remote: Resolving deltas: 100% (141/141), completed with 31 local objects.
remote: GitLab: You are attempting to check in one or more blobs which exceed the 100.0MiB limit:
remote: 
remote: - cd5a37963e9b791d62074fbc41415cdb45921a2f (220.18 MiB) 
remote: 
remote: To resolve this error, you must either reduce the size of the above blobs, or utilize LFS.
remote: You may use "git ls-tree -r HEAD | grep $BLOB_ID" to see the file path.
remote: Please refer to https://gitlab.com/help/user/free_push_limit and
remote: https://gitlab.com/help/administration/settings/account_and_limit_settings
remote: for further information.
To https://gitlab.com/project.git
 ! [remote rejected] dev.shj -> dev.shj (pre-receive hook declined)
error: failed to push some refs to 'https://gitlab.com/project.git'

문제 발생
git에 푸시하던 중 발생한 현상.

문제 원인
파일 크기가 100mb를 초과할 경우 푸시할 때 발생하는 메시지.

시도한 방법
1.cd5a37963e9b791d62074fbc41415cdb45921a2f (220.18 MiB) 파일을 찾아 제거하려고 했으나 파일이 존재하지 않음.
숨겨진 폴더나 파일도 존재하지 않아 명령어로 제거 시도.

2.cd5a37963e9b791d62074fbc41415cdb45921a2f 파일이 어디서 생성된 건지도 모르겠고 가비지 파일인 거 같아 제거시도.

3.문제가 발생한 파일의 경로를 찾으려고 위 명령어를 사용했지만 존재하지 않음.

git ls-tree -r HEAD | grep cd5a37963e9b791d62074fbc41415cdb45921a2f

4.강제 푸쉬(팀원들과 내용 공유 후에 하면 안되는 거 알지만 역시나 실패)

git push origin --force

해결 방법
로컬에서 프로젝트 폴더를 삭제 후 다시 복제하여 작업된 부분만 커밋.

느낀 점
저 가비지 파일이 뭘까. 시도한 방법들에 비해 해결이 제대로 되지 않았을 뿐더러 시간 낭비를 너무 많이 했다.

profile
오늘은 무슨 오류를 만날까?! 널 만나러 가는 길~ LOL

0개의 댓글