300x250

목차

     

     

    1. Git의 용량 제한, LFS의 개념

     

    Git은 여러 작은 소스코드 파일들을 위한 Version Control System (VCS)이다. 가장 사용자가 많은 Github의 경우 50MB 이상의 파일을 Push할 경우 Warning, 100MB이상의 파일을 Push할 경우 Error가 발생한다.

    하지만 경우에 따라서 대용량 파일을 Git repository에 Push해야 하는 경우가 있다. (예를들어, 지금 내가 하고있는 'Unity'와 Git을 연동시킨다던지..)

    이런 경우, Git LFS (Large File Storage)를 사용하면 된다.

     

     

     

    2. LFS 적용 방법 (Github LFS)

     

    먼저, 다음 사이트에서 LFS를 다운받는다.

    https://git-lfs.github.com/

     

    Git Large File Storage

    Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

    git-lfs.github.com

     

    Mac의 경우, brew update를 해주어야 한다.

    https://brew.sh/index_ko

     

    Homebrew

    The Missing Package Manager for macOS (or Linux).

    brew.sh

     

    이후에 터미널에서

    brew install git-lfs

    를 입력해주고, lfs를 적용하고 싶은 repository로 이동한 후

    git lfs install

    를 입력한다.

     

    어떤 대용량 파일을 Push하는가에 따라 다르겠지만, Unity의 경우 '.gitattributes', '.gitignore'이라는 파일을 추가해주어야 했다. (내 경우에 파일을 Push하기 전에 두 가지 파일을 생성, Push해야 했다.)

     


    728x90
    • 네이버 블러그 공유하기
    • 네이버 밴드에 공유하기
    • 페이스북 공유하기
    • 카카오스토리 공유하기