Initialize and Configure Git LFS
Initialize LFS on an existing repo or create a repo and initialize LFS from the start.
Initializing LFS on an existing repo
Navigate to your preferences and you should see the LFS tab:
Note: If you do not see the LFS tab, make sure you have at least version 3.0.0 of GitKraken installed and you have installed the requirements listed above.
Click to initialize LFS on the repo:
Exit preferences to access two new things: an LFS button in the toolbar and an unstaged change to the .gitattributes
file that needs to be committed.
Stage and commit the changes to the .gitattributes
file to finish the LFS initialization.
Existing files need to be untracked from Git and re-tracked to count as LFS files. Consider removing the files from the repository (Git will think they have been removed/deleted), commit, then re-add the files and re-commit.
The re-added files should now follow your new LFS tracking pattern.
Initializing LFS on a new repo
When you initialize a new repository, you will have the option to Initialize with LFS.
Configuring LFS
Once LFS is initialized on a repository, add tracking patterns to the .gitattributes
file. These tracking patterns will tell LFS which files to monitor in your repository.
Access the .gitattributes
file by going to Preferences LFS or by editing the .gitattributes
file directly in your text editor.
As another option, add tracking patterns to the repository’s .gitattributes
file through the Unstage pane in the right panel.
Select the WIP node, right click the file you wish to be tracked by LFS, and select the desired option under LFS.
Note: GitKraken will automatically perform an LFS pull after cloning a repo or initializing a submodule with LFS