Sublime Forum

LFS support?


I just enabled LFS support (Gitlab) and it works fine form me from the command line and Sublime Merge (mac), it doesn’t work for a co-worker (win). He gets the following error:


He’s new to git and never used it from the command line. I would have assumed that Sublime Merge would have enabled anything needed by git, but I could be wrong.

I also want to enable this for the project’s artists, but that could be a problem unless it’s a simple process to enable lfs.

Am I missing an obvious sep?



Sublime Merge for macOS and Windows ships a bundled version of git that does not include LFS. I’d suggest changing Sublime Merge to use the system git instead if git & git-lfs are already installed.



ok, thanks. I guess that explains it. I’m dealing with some very non-tech savvy people and doing anything fro the command line is going to be a support nightmare for me. I’ll look for a better solution than Git and LFS.

Is there a reason that Sublime Merge doesn’t ship with LFS? Seems like a big omission.



For the same reason we don’t ship with package control or other workflow specific plugins with Sublime Text: Some people don’t want them and it increases the size of the distribution. lfs is not part of git and if we shipped every git extension under the sun it would be a mess. On Linux we don’t even bundle git at all.

A good feature request that you may want to add to our official issue tracker would be a way to download git extensions for the bundled git from within Sublime Merge.

1 Like


Done, thanks.



I had the same issue. I resolved it by adding the path that contains the git-lfs.exe file to my PATH environment variable and restarted Sublime Merge for it take effect.



Given that I have git-lfs installed on my system & I have set Sublime Merge to use the system Git (thus incl. git-lfs),
…can I expect the UI of Sublime Merge to indicate that a committed file has been added to LFS, e.g. with a label “LFS”? (if so: where can I see that, or how can I turn it on?)

On the command line you would run git lfs ls-files to see which files are in the index and working tree, but ideally I’d be able to quickly see that in Sublime Merge as well. Currently, it looks like files were erroneously added as non-LFS files, but I know this not to be the case as they’re shown in the output of git lfs ls-files.



Hi @Paul-van-Klaveren,

Thanks for reaching out!

Currently Sublime Merge doesn’t have an indicator for which files are added to the LFS.
I’d encourage you to submit an enhancement request on our official tracker here as this sounds like a great addition:

- Dylan from Sublime HQ



:heart:︎ Thanks for the quick response! I have created a feature request in sublime_merge:

To anyone else reading this, please upvote it :wink:



In my case, and that of a colleague, this alone doesn’t solve the problem. After changing the Git preference to system and restarting Sublime Merge (or even macOS), Sublime Merge is still unable to perform basic Git commands like staging files that aren’t tracked by Git LFS.

On the command line, I am running:

$ git --version                                                                                                                                                                                     
git version 2.35.1
$ which git
$ which git-lfs 
$ echo $PATH

Yet when I retrieve Sublime Merge’s HelpDebug Information, it shows a different Git version & a different PATH:

=== App Version Information ===
Build: 2068

=== Git Version Information ===
Using Git: git (system)
git version 2.32.0 (Apple Git-132)
PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin (from shell)
environment variables loaded using: /bin/zsh -l

In my current .zshrc I change the PATH to add Sublime Text’s bin dir — I didn’t add anything related to git-lfs. However, the path in the Debug Information doesn’t match that of my PATH env var, so perhaps I am misinterpreting what it represents.

(I’m running Oh My ZSH, if that helps diagnosing the problem)



Based on

“… we load the environment variables using /bin/zsh -l , it will only load environment variables set in the login profile (i.e. .zprofile ).”

:white_check_mark: I fixed my setup by making a .zprofile file and adding the homebrew shell setup there:

eval "$(/opt/homebrew/bin/brew shellenv)" # Assumption: we installed git & git-lfs via homebrew and Sublime Merge is set to load "system" (read: login) PATH.