Sublime Forum

GIT error popup

#1

Sublime has been working for 2-3 months. Today I get a GIT error. Can’t do ANYTHING (including menu options) except quickly shut it down.

Your Git binary cannot be found. If it is installed, add it to your PATH environment variable, or add a ‘git library’ setting ‘User/GitGutter-sublime-settings’.file

What now?

0 Likes

Question and help
#2

If it’s GitGutter that’s causing you problems specifically, it might be because it was updated in the couple of days. The package control messages include:

  • Enhance git_binary setting

In that case, it suddenly telling you that your git binary can’t be found when it worked before is possibly a symptom that you customized the default settings instead of setting customized user settings, and so when the package updated it reverted back to the default settings again, which specify finding the Git binary in the path.

It’s best to e.g. select Preferences > Package Settings > GitGutter > Settings - Default, copy the entire contents, and then do Preferences > Package Settings > GitGitter > Settings - User and paste them in, updating as needed. That way your settings will persist when the package updates itself.

0 Likes

Question and help
#3

I’m experiencing the same error! Just came back to the office this morning and can’t do anything with Sublime due to the update. Has anyone found a fix?! I don’t really want to have to uninstall Sublime and Reinstall. How can I disable gitgutter (or even just delete it) without being logged in to Sublime?! This error prevents me from doing anything in Sublime, I can’t access any of the menus or anything…

0 Likes

#4

Use ctrl+shift+p than Package Control - Remove Package
I’ve done even with annoying window appearing every second :slightly_smiling:

0 Likes

#5

You can add GitGutter to the list of ignored_packages in your sublime settings in order to get sublime to ignore the package. I don’t know how usable sublime is in this state (is it just throwing nonstop error dialogs that you can’t dismiss, for example?) but you may be able to select Preferences > Package Control from the menu and disable GitGutter that way.

If not, then you need to edit Packages/User/Preferences.sublime-settings in some other editor (the location of this directory can be found here if you don’t know where that is offhand) and modify ignored_packages to include GitGutter:

	"ignored_packages":
	[
		"GitGutter",
		"Vintage"
	],
0 Likes

#6

I’ve looked at git-gutter settings and the file is empty. I used package control to disable it yesterday and today it’s back again. I can’t even get into package control. This is beyond aggravating. What git binary is it trying to find?

0 Likes

#7

Did that. It comes back like an evil spirit.

0 Likes

#8

I know of no way for a package that’s been added to the ignored_packages setting to still be somehow loaded after a restart.

I believe that the package name is derived from the name of the directory that the package is installed in, so if it was stored in some package other than GitGutter, I suppose that would do it. Something like that could happen if you manually installed the package in a directory other than GitGutter or if the directory somehow got renamed (maybe during the package upgrade process? I don’t know).

The default one or the one in your User directory? The default one shouldn’t be empty. If it is, that may be the issue and reinstalling the package might help (assuming you can determine why it still works even when it’s disabled, anyway).

If you don’t explicitly set the git_binary setting to point at the git executable directly, it defaults to searching through your system path to try and find it. The error message appears in the case that there’s no setting telling it where the binary can be found AND it’s also not available in the system path.

For the sake of reference, on my Linux and MacOS machines this is /usr/bin/git, while on my Windows machine it’s installed at C:\Program Files\Git\cmd\git.exe; your mileage may vary though, since I can’t recall if the windows version asked me where it should install or if it picked that location on it’s own.

Since the default path under Linux and MacOS generally always contains /usr/bin the only machine I had to configure was my windows machine, where I chose to add the proper location to the system path so I didn’t need to have a system specific setting just for Windows.

0 Likes

#9

I saw the same thing today. I ended up installing Git and setting up the path, then removing package Git Gutter (I had installed it based on a website a coworker recommended, but we’re not using Git).

0 Likes

#10

I was finally able to get it in ignored packages and it seems to be okay at the moment. Thanks.

0 Likes

#11

I installed Git, too, but I’m not sure where to put the path (if this happens again).

0 Likes

#12

I’m having the same issue, can’t do anything besides clicking OK on the popup or closing ST entirely.
I even added git to my PATH environment variables, didn’t seem to work.
Adding GitGutter to ignored_packages using another editor works for now. Atleast I can use ST now.

0 Likes

#13

New gitgutter update says endless dialog bug should be fixed:

  • Fix error dialog for missing git binary from reopening
    in an endless loop. Should only show once per session now.
0 Likes

#14

I think I saw that last night. Thing is, it’s in my ignored packages settings. You can’t get rid of the $#%^& thing!

I installed Git. I still don’t understand how to satisfy the error.

0 Likes

#15

As mentioned by @OdatNurd, you will need to edit the path on GitGutter.sublime-settings. Select Preferences > Package Settings > GitGitter > Settings - User

And under git_binary enter the correct path based on your system.

Example: "git_binary": "/usr/bin/git",

And I think that should fix it.

0 Likes

#16

The problem is I don’t know what file I’m looking for to determine the path to the git binary. I don’t see any sub-dir like bin. THat looks like something from a DOS system. I don’t see anything referencing git in ProgramFiles but I see something under AppData. Or are you talking about something other than Git that I downloaded?

0 Likes

#17

I would do a system wide file search to see where git.exe can be found. Or, if the installer put a shortcut somewhere to e.g. Git Bash or Git Cmd, you can check its properties to see where it’s contained and see if there’s a git.exe nearby.

0 Likes

#18

Yup that’s right, what I did to get the right path was used the which git command.

0 Likes

#19

Reinstalled the package but User settings was still empty and GitGutter was unable to find git binary from PATH even though it’s there (I’ve been using git for years so I’m pretty sure about this). This just started today when I launched Sublime 2 and was greeted with GitGutter update note. All worked well yesterday and every day before that since installing GitGutter (also been using it for a few years I believe).

Adding { "git_binary": "/usr/bin/git" } to User settings worked of course but I shouldn’t have needed to do that if GitGutter worked properly.

0 Likes

#20

I finally found it and added it to user settings. Thanks.

0 Likes