Skip to content

Config_GitLFS

Max_KUMC_Desktop edited this page Jul 16, 2020 · 1 revision

Configuring Git-LFS

How do I initialize this repository with Git-LFS?

Installing Git Large File Storage (Git LFS)

If you do not already have Git LFS installed on your local computer, first follow instructions here in order to install it. To summarize:

  1. Download the installer here.

  2. Run the executable and complete the installation process.

  3. Verify that it is installed by running the following in Git Bash

    $ git lfs install

Initializing Git LFS for nigeLab

If you would like to use the terminal to initialize form the command line (Git Bash), read here; otherwise, if you are using GitKraken (typical git GUI at CPL or IIT), read here.

Command Line

Follow the documentation on github, summarized here:

  1. In the terminal, change your current working directory to the .git folder where you installed nigeLab.

  2. For each type of file that you'd like to track, run the following:

    $ git lfs track "*.[extension]" filter=lfs diff=lfs merge=lfs -binary

    Where [extension] corresponds to the files to be tracked using Git LFS.

    Currently, the following file types are tracked in the committed nigeLab .gitattributes file:

    *.svg filter=lfs diff=lfs merge=lfs -binary
    *.png filter=lfs diff=lfs merge=lfs -binary
    *.jpg filter=lfs diff=lfs merge=lfs -binary
    *.jpeg filter=lfs diff=lfs merge=lfs -binary
    *.rhs filter=lfs diff=lfs merge=lfs -binary
    *.rhd filter=lfs diff=lfs merge=lfs -binary
    *.PNG filter=lfs diff=lfs merge=lfs -binary
    *.JPG filter=lfs diff=lfs merge=lfs -binary
    *.bmp filter=lfs diff=lfs merge=lfs -binary
    

GitKraken

  1. Open the nigeLab repository tab in GitKraken.
  2. Press ctrl+comma or use the file menu to navigate to File > Preferences...
  3. About halfway down on the left, under Repo-Specific Preferences, you should see a tab option for LFS, click that.
  4. Click the button to initialize Git LFS file tracking for this repository.
Clone this wiki locally