cindy {~/dev/ndc-ui}±(dev); greetings, earthling [8.449Mb]$ ☞ git push
error: inflate: data stream error (unknown compression method)
error: unable to unpack 6f9633f847dcc930d15d7b1e781a4cc4895de56b header
fatal: loose object 6f9633f847dcc930d15d7b1e781a4cc4895de56b (stored in .git/objects/6f/9633f847dcc930d15d7b1e781a4cc4895de56b) is corrupt
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'http://gitlab.~~~~~~.git'
.git 디렉토리의 hash 파일이 깨진 것이 원인.
혹시 모르니 백업을 해두길 권장합니다.
git fsck --full
해당 명령어를 치면 결과로 깨진 파일들이 쭉 표시됩니다.
error: inflate: data stream error (unknown compression method)
error: unable to unpack header of .git/objects/07/0649ca71bd2ba71f71ee215a731e7b03d287a7
error: 070649ca71bd2ba71f71ee215a731e7b03d287a7: object corrupt or missing: .git/objects/07/0649ca71bd2ba71f71ee215a731e7b03d287a7
error: inflate: data stream error (unknown compression method)
error: unable to unpack header of .git/objects/47/24a71d103cdde9789786e2d0c70f4751531a1d
error: 4724a71d103cdde9789786e2d0c70f4751531a1d: object corrupt or missing: .git/objects/47/24a71d103cdde9789786e2d0c70f4751531a1d
error: inflate: data stream error (unknown compression method)
error: unable to unpack header of .git/objects/6f/9633f847dcc930d15d7b1e781a4cc4895de56b
error: 6f9633f847dcc930d15d7b1e781a4cc4895de56b: object corrupt or missing: .git/objects/6f/9633f847dcc930d15d7b1e781a4cc4895de56b
Checking object directories: 100% (256/256), done.
error: a508fcd0e5c9573604ab8c338380e504b942718d: invalid sha1 pointer in cache-tree
error: inflate: data stream error (unknown compression method)
error: unable to unpack 6f9633f847dcc930d15d7b1e781a4cc4895de56b header
fatal: loose object 6f9633f847dcc930d15d7b1e781a4cc4895de56b (stored in .git/objects/6f/9633f847dcc930d15d7b1e781a4cc4895de56b) is corrupt
깨졌다고 표시되는 .git/objects/{index} 파일을 모두 제거해준 다음 리셋해주면 끝!
git reset
이후에는 같은 문제 없이 git이 잘 동작하는 것을 확인할 수 있습니다.