10
28

깃허브는 100MB 넘는 파일을 올리지 못한다.

그래서 LFS를 사용해 파일을 분할해서 올린다.

 

git lfs 설정

git lfs install

 

git lfs 해제

git lfs uninstall

 

git lfs 관리할 파일 추적 (그 파일 처음 lfs 타깃 하면 1번 생략)

1. git rm --cached <file path>

2. git lfs track <file path>

"file path" 쌍따옴표

git .gitattributes 등록

 

git add .gitattributes

git commit -m "update gitattributes for lfs"

git push

 

커밋 하면 된다.

//

LFS File 관리 해제

 

git lfs untrack <file>

(또는. gitattributes에서 수동으로 삭제 후)

 

git rm --cached <file>

git add <file>

 

위는 예시

아무것도 몰라도 이것만 따라치면

100MB 파일 헤매지않고 보낼수 있을것이다.

ㅜㅜ고생하지말자

 

+해프닝

 

근데 오늘 커밋 하려는데 Git Warning: LF will be replaced by CRLF가 엄청 많이 뜨는 것이다.

 

구글에 검색하니까 이걸 cmd에 쳐보라는 것이다.

git config --global core.autocrlf false

 

해결되었다.

 

'Github' 카테고리의 다른 글

Azure Dev Ops 사용  (0) 2022.05.03
COMMENT