How do i see modified lines inside Sublime text 3
2 Answers
Problem solved using Git Gutter
Install Git gutter in Sublime text 3:
cd ~/.config/sublime-text-3/Packages
git clone git://github.com/jisaacks/GitGutter.git
By default, Git Gutter compares your working copy against the HEAD. You can change this behaviour through the ST command palette. The following options are available:
- Compare against HEAD
- Compare against particular branch
- Compare against particular tag
- Compare against specific commit
To change the compare option:
Open the command palette (Ctrl-Shift-P
for Windows/Linux, Cmd-Shift-P
for Mac)
Start typing GitGutter
You'll see the 4 options listed above, select one with the keyboard.
Choose the branch/tag/commit to compare against.
To the left of line numbers we can see the changes add/updated/deleted
I know this is an old question, but Sublime offers the subl -
command for piping output into a new tab.
git diff | subl -
P.S. To show the full file (including unchanged lines), you could try the command given from this SO answer:
git diff -U$(wc -l MYFILE) MYFILE | subl -
git diff
?^M
is the difference between linux and windows line endings. To ignore these usegit diff --ignore-space-at-eol
.