Skip to main content

Enterprise Server 3.16 目前作为候选发布提供。

安装 Git Large File Storage

为使用 Git LFS,您需要下载并安装不同于 Git 的新程序。

Platform navigation

  1. Navigate to git-lfs.com and click Download. Alternatively, you can install Git LFS using a package manager:

    • To use Homebrew, run brew install git-lfs.
    • To use MacPorts, run port install git-lfs.

    If you install Git LFS with Homebrew or MacPorts, skip to step six.

  2. On your computer, locate and unzip the downloaded file.

  3. Open Terminal.

  4. Change the current working directory into the folder you downloaded and unzipped.

    cd ~/Downloads/git-lfs-1.X.X
    

    Note

    The file path you use after cd depends on your operating system, Git LFS version you downloaded, and where you saved the Git LFS download.

  5. To install the file, run this command:

    $ ./install.sh
    > Git LFS initialized.
    

    Note

    You may have to use sudo ./install.sh to install the file.

  6. Next, make required changes to your global Git config:

    $ git lfs install
    > Git LFS initialized.
    
  7. If you don't see a message indicating that git lfs install was successful, please contact your site administrator. Be sure to include the name of your operating system.

Further reading