Sublime Text 3 Git Gutter not working
Asked Answered
W

2

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?

Wyly answered 13/11, 2016 at 5:15 Comment(3)
See my edited answer for the last part of your question: you don't download the zip, you use git clone. Read git-scm.com/book/en/v2/…Itchy
It cloned the file but the GitGutter is still not working.Wyly
Sorry for the delayed answer.Wyly
I
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!

Isooctane answered 19/1, 2017 at 19:0 Comment(0)
I
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)

Itchy answered 13/11, 2016 at 7:29 Comment(22)
I don't have the archive. I am using the version 2.1.0.0 32-bit on Windows XP. What is Git Repo?Wyly
@Wyly 2.10 is good enough. Git repo is a GIt repository you have initialized locally: see git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-RepositoryItchy
So how do I make sure GitGutter is working properly in Sublime Text 3?Wyly
I use the Sublime Text 3 Build 3126.Wyly
By making sure you are editing a file which is actually in a local git repository (where there is a .git subfolder)Itchy
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.Wyly
I want to edit an HTML file and a CSS file in Sublime Text 3 build 3126.Wyly
Sure, are those files in a local git repo?Itchy
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.Wyly
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.Itchy
@Wyly 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.Coen
This is more like the stuff I need! I will try to load GIT Gutter this way!Wyly
Still not working. I typed in some random some stuff and it is still not showing anything.Wyly
I am a complete noob in this.Wyly
@Wyly 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?Itchy
How am I supposed to put pictures here?Wyly
Again, sorry for the nooby questions.Wyly
Except that, in my case, no plus sign or triangles or circles, nothing, appears on in my editor.Wyly
@Wyly 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.Itchy
Do it where? In Sublime? In Git?Wyly
@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 commited it. Git gutter, will indicate, within Sublime Text, similar feedback: it compares now to then to show which lines have changed.Mint
Ucacity.com has a Great (free) course on using Git.Mint
I
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!

Isooctane answered 19/1, 2017 at 19:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.