1

When I first installed GitGutter, it kept saying that it needed Git and the path specified.

I first moved the Git in the same folder, but then I decided to switch to its original folder and specified the path in the environment variable.
It stopped showing the error message, but it is still not working.

Why is it not working?

Here is what I have tried:

Here is before I add a bunch of spaces:

before

This is after I add the spaces:

after

As you can see, GitGutter does not display anything indicating my file has changed.
Why?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
GroxTheProgrammer
  • 431
  • 1
  • 6
  • 12

2 Answers2

1

You need to make sure to restart SublimeText after having changing the $PATH (Mac, Linux) or %PATH% (Windows)

Check your version of SublimeText3 and GitGutter

On Windows, make sure to uncompress the archive PortableGit-2.10.2-64-bit.7z.exe anywhere you want and reference that path.

Finally, make sure the files you are editing in SublileText3 are part of a git repo.

Here is the repository that I created: https://github.com/GroxTheProgrammer/concerning-git-gutter. I then downloaded the zip.

Don't download the zip.

Do:

cd c:\mywork
git clone https://github.com/GroxTheProgrammer/concerning-git-gutter
cd concerning-git-gutter

Then edit a file like C:\mywork\concerning-git-gutter\README.md in SublimeText (with GitGutter installed)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I don't have the archive. I am using the version 2.1.0.0 32-bit on Windows XP. What is Git Repo? – GroxTheProgrammer Nov 13 '16 at 16:23
  • @GroxTheProgrammer 2.10 is good enough. Git repo is a GIt repository you have initialized locally: see https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository – VonC Nov 13 '16 at 16:25
  • So how do I make sure GitGutter is working properly in Sublime Text 3? – GroxTheProgrammer Nov 13 '16 at 17:03
  • I use the Sublime Text 3 Build 3126. – GroxTheProgrammer Nov 13 '16 at 17:04
  • By making sure you are editing a file which is actually in a local git repository (where there is a .git subfolder) – VonC Nov 13 '16 at 17:05
  • But I don't want to edit some git file. I want GIT Gutter do what it needs to do. Right now, it is doing nothing at all. – GroxTheProgrammer Nov 13 '16 at 17:46
  • I want to edit an HTML file and a CSS file in Sublime Text 3 build 3126. – GroxTheProgrammer Nov 13 '16 at 18:22
  • Sure, are those files in a local git repo? – VonC Nov 13 '16 at 18:30
  • Does every website that I make have to be in a local git repository? If yes, how? Again, for the Git Gutter to work properly. – GroxTheProgrammer Nov 13 '16 at 18:41
  • Well, I suspect git gutter would only display git information about files that are in a got repo. It can be a simple local git repository. Reading the second chapter of the Git ProBook I mentioned before will help you. – VonC Nov 13 '16 at 19:05
  • 1
    @GroxTheProgrammer read up on what `git` actually is and how to use it. GitGutter **only** works in Sublime if you are editing files that are contained in a git repository. If you are just editing a random file that's not under git version control, of course GitGutter won't work! Set up an account on GitHub, initialize a repo there, add some files through the web interface, then clone to your local hard drive and edit them, then GitGutter will show you the changed, added, and deleted lines. Make sure you read the complete documentation for GitGutter to ensure it's set up properly. – MattDMo Nov 13 '16 at 19:29
  • This is more like the stuff I need! I will try to load GIT Gutter this way! – GroxTheProgrammer Nov 13 '16 at 19:55
  • Still not working. I typed in some random some stuff and it is still not showing anything. – GroxTheProgrammer Nov 13 '16 at 20:24
  • I am a complete noob in this. – GroxTheProgrammer Nov 13 '16 at 20:25
  • @GroxTheProgrammer No problem. Can you edit your question and show us what you type, as well as a screenshot of your SublimeText illustrating that GitGutter does not show what you expect? – VonC Nov 13 '16 at 20:27
  • How am I supposed to put pictures here? – GroxTheProgrammer Nov 13 '16 at 20:44
  • Again, sorry for the nooby questions. – GroxTheProgrammer Nov 13 '16 at 20:45
  • Except that, in my case, no plus sign or triangles or circles, nothing, appears on in my editor. – GroxTheProgrammer Nov 13 '16 at 20:49
  • @GroxTheProgrammer This video illustrates GitGutter on files which are part of a git repo. You need to clone an existing repo and see GitGutter working there. – VonC Nov 13 '16 at 20:49
  • Do it where? In Sublime? In Git? – GroxTheProgrammer Nov 13 '16 at 21:16
  • @GroxTheProgrammer: when they reference "changed files" they mean changes in the file *since the last commit*. In other words, it compares current state vs state *At the Time It Was Last Committed*. You can consider that `.git`, your git repo, makes a kind of "bookmark", lets say, or a "snapshot" of a file when you `commit` it. Now you can `git diff` on the command line to compare your file now vs then, when you last `commit`ed it. Git gutter, will indicate, within Sublime Text, similar feedback: it compares now to then to show which lines have changed. – SherylHohman Jan 03 '18 at 02:38
  • Ucacity.com has a Great (free) course on using Git. – SherylHohman Jan 03 '18 at 02:41
0

Try going to this link. However, this assumes that you have gotten git up and running. It might be what you are looking for https://github.com/jisaacks/GitGutter/issues/152. Hope that helps!

GameCoder
  • 2,358
  • 2
  • 9
  • 10