Git Diff Margin


Git Diff Margin displays live changes of the currently edited file on Visual Studio 2010+ margin and scroll bar.

(20) Review
Visual Studio
2015, 2013, 2012, 2010
Download (24,096)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (20)
Q and A (11)
Sign in to write a review
Sort by:

by Fex808 | Thu 2:16 PM

Absolutely Awesome!

by J. Lucas | December 22 2015

Laurent Kempé December 22 2015
| Edit |

Thanks Lucas!

by CrazyOrc | November 27 2015

Small and handy

Laurent Kempé December 22 2015
| Edit |

Thanks CrazyOrc!

by TURNSKIN85 | November 06 2015

5 start, but missing whitespace ignoring option

Laurent Kempé December 22 2015
| Edit |

Thanks TURNSKIN85!

by TiBall | November 03 2015

Super helpful!

Laurent Kempé November 04 2015
| Edit |

Thanks TiBall!

by Gianluigi Conti | October 09 2015

Best extension for git users. Saves you tons of clicks!

Laurent Kempé October 12 2015
| Edit |

Thanks Gianluigi!

by seraphim207 | September 09 2015

Very useful extension!

Laurent Kempé September 11 2015
| Edit |

Thanks seraphim207!

by Drew Noakes | August 22 2015

A great add in, thanks very much. Gives behaviour I came to appreciate in JetBrains IDEs such as IntelliJ and Clion.

Laurent Kempé August 24 2015
| Edit |

Thanks Drew! The idea comes from IntelliJ JetBrains IDEs which I really like!

by FandaCZ | July 24 2015

Highly appreciate this extension. For a long time I missed it. This is exactly what I was looking for. Thank you guys!

Laurent Kempé August 12 2015
| Edit |

Thanks! Happy to read that you enjoy it

by mikhail.matrosov | July 13 2015

Brilliant! Thanks! Was looking for this extension for years!

Laurent Kempé July 14 2015
| Edit |

Thanks! Happy you enjoy it

by kunemata | April 11 2015

Laurent Kempé July 14 2015
| Edit |

Thanks! Happy you like it

by metacircle | October 08 2014

Awesome. This will make my daily work so much more effective :)

Laurent Kempé October 08 2014
| Edit |

Thanks. Nice to hear that! Enjoy it

by TomasDeml | October 03 2014

Very useful!

Laurent Kempé October 03 2014
| Edit |


by ChrisAlanSearle | September 29 2014

An absolute briliant have add-on for any developer using GIT, makes tracking changes and seeing previous version a breeze.

Laurent Kempé September 29 2014
| Edit |


by Philip Pittle | September 24 2014

Simple and effective!

Laurent Kempé September 24 2014
| Edit |

Thanks Philip!

by ScruffyDuck | September 02 2014

This is really helpful and a great adjunct to my source control process. Thanks Laurent

Laurent Kempé September 02 2014
| Edit |

You are welcome!

by Rick Sladkey | December 02 2013

This extension is what the "Track changes" feature should have been all along and you don't need them both so simplify things by turning off "Tools -> Options -> Text Editor -> Settings -> Track changes".

Laurent Kempé January 11 2014
| Edit |

Thanks Rick! I thought the same when I worked with IDE like IntelliJ, this is why I started to implement Git Diff Margin. Thanks for the contribution too!

by mkempe | November 13 2013

Great extension and pretty easy to install ;)

by apostasia | November 07 2013

Been using this as part of the Git Source Control Provider for some time now, just wanted to say that the diff margin has been so useful to me there are no words for it :] Really, this thing is simple yet super effective and a major productivity boost. Everybody using Git and VS should be using this.

Laurent Kempé November 08 2013
| Edit |

Thank you very much!

by MarkAurit | November 02 2013

Ive tried installing this twice under vs2012 pro, which I run as admin, and after restarting vs I get a "an exception has been encountered ... you can get more information ...". Shame, I love good addins. Im using the git provider w/git extensions. Assuming it works as advertised Id certainly rate it much higher ....

Laurent Kempé November 04 2013
| Edit |

Thanks for the feedback! What would have been very much helpful to troubleshoot your issue is to provide a bug entry with the log file provided from the dialog which you described. You might still create it here -

Sign in to start a discussion

  • Not working in Visual Studio Community 2015
    3 Posts | Last post August 21, 2015
    • If a file has any changes, the whole file is highlighted as modified.
    • Thanks for the feedback, could you please log a bug at with the type of project and the type of file which have issues.
    • Done:
  • Exception when opening sql table
    3 Posts | Last post June 30, 2015
    • Hi,
      I get an exception when opening a sql table definition from Visual Studio > SQL Server Object Explorer.
      Here is the entry from the ActivityLog.xml:
          <source>Editor or Editor Extension</source>
      System.ArgumentException: The path is not of a legal form.&#x000D;&#x000A;   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)&#x000D;&#x000A;   at System.IO.Path.GetFullPathInternal(String path)&#x000D;&#x000A;   at GitDiffMargin.DiffMarginFactoryBase.TryGetMarginCore(IWpfTextViewHost textViewHost)&#x000D;&#x000A;   at GitDiffMargin.EditorDiffMarginFactory.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.&lt;AddMargins&gt;b__3(IWpfTextViewMarginProvider mp)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)       
    • Sorry, in Visual Studio 2015.
    • Hi, 
      Thanks for the report!
      Could you log your issue in Github please -
  • Diff decorations should also appear on scrollbars
    7 Posts | Last post May 26, 2015
    • This is an excellent extension. The only thing I miss is to show the decorations over the scrollbar and not just on the left hand side.
    • Thanks Benjamin! I started to work on it ;)
    • Excellent news, thanks! If you need a tester, let me know! By the way, I am using the "Map mode" for the scrollbar, not the "bar mode" (check out Text Editor > All Languages > Scroll Bars). It would be great if the decoration shows up for map mode scrollbars. The main advantage I see for map mode is that you can actually click anywhere on the scrollbar and it moves you there. Where as the other mode you just scroll up or down one page.
    • Thanks! I added your point to the github issue -
      btw are you from Zurich?
    • This is now available with version 2.0
    • Hi, is there a way to turn the indicator on the scrollbar off? I would like to have it ONLY on the left side, because I am using Resharper, which already fills up the scrollbar quite heavily.
    • Hi Boriatex, at the moment there is no way to do it! But there is a feature request created
  • 2012 package
    4 Posts | Last post September 24, 2014
    • Hello,
      I have some issues installing the 2012 package with chocolatey. Here is the error. Would you have any idea?
      Thank you very much.
      Write-Error : GitDiffMargin.vs2012 did not finish successfully. Boo to the chocolatey gods!
      [ERROR] There was an error installing 'GitDiffMargin.vs2012'. The exit code returned was 2003.
      At C:\Chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:30 char:14
      +   Write-Error <<<<  $errorMessage
          + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
          + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error
    • Hello
      Sorry but I have no clue! It looks like an error in chocolatey itself, could you update choco first?
      We will come with another version hopefully next week, maybe it will solve your problem.
    • Coudl you try version 3.0 which we shipped yesterday,
    • It works! Thank you very much.
  • The driectory name is invalid
    2 Posts | Last post September 04, 2014
    • System.ArgumentException: The directory name C:\dev\SqorRest\.git\modules\packages\.git is invalid.
      This is a repo that has submodules.   The submodules are located under "packages".  Under packages there are four submodules.  The directory ".git" does not exist under "packages" and I do not know why the extension is trying to look for such a folder.  Let me know if I can provide any further info.
    • I created the issue at github -
      It would be good to continue there the discussion
  • Crashes VS 2013
    5 Posts | Last post September 02, 2014
    • Just installed the latest version (  Now VS 2013 crashes about 30 seconds after I load my project.  I disabled Git Diff Margin (via Tools/Extensions and Updates) and VS stopped crashing.
      Now I'm trying to figure out the mechanics of reverting to the older, working version...
    • UPDATE: I uninstalled Git Diff Margin, and VS is still crashing. Hmmm... Ok, so unless something got left behind (or broken) by the previous installation, it looks like Git Diff Margin is off the hook for this problem. Or not... the problem started happening immediately after I upgraded to the latest version...
    • On a whim, I reinstalled Git Diff Margin (figured I couldn't make things any worse), and now the problem seems to have gone away.  Go figure...
    • That's weird! We have not experienced such problems during the testing of Git Diff Margin.
      During uninstall nothing should be left behind, you check your folders in C:\Users\{UserName}\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\ to see if there is still one with Git Diff Margin.
      Do you have some others plugins installed and also removed one before re-installing Git Diff Margin?
    • So according to your last entry on the issue report all is good now!
  • Thinks entire file has changed
    8 Posts | Last post September 01, 2014
    • I have two computers with presumably identical stuff on them: VS 2013, GitHub for Windows, git version 1.8.3.msysgit.0, Git Diff Margin 1.3.2., current source control plug-in is Microsoft Git Provider.
      On one computer, everything works as expected.  On the other computer, Git Diff Margin thinks that the entire contents of any file I open is different, even if I just open the file to look at it and don't modify it at all.
      Any ideas?
    • Hi Bob, 
      Thanks for your feedback
      There is still a bug in that area in GitDiffMargin 1.3.2. But are you talking about the same repository cloned on two different machines? If yes then I would say the problem is due to a git configuration which is different on both machines, like core.autocrlf for example. Could you check that please?
    • Yes, this is a GibHub repository that I've cloned to two different Windows 8.1 machines.  The global config (C:\Users\MyProfileName\.gitconfig) seems to be more or less identical on both machines.  Specifically, on the machine that works correctly, the global config is
      name = Bob Altman
      email = <my email>
      tool = araxis
      [difftool "araxis"]
      path = C:\\Program Files\\Araxis\\Araxis Merge\\compare.exe
      tool = araxis
      [mergetool "araxis"]
      path = C:\\Program Files\\Araxis\\Araxis Merge\\compare.exe
      On the machine that doesn't work, the global config is just the [user] section (without the [diff] or [merge] sections)
    • After more investigation, it turns out that, sure enough, I was bitten by inconsistent line endings.  On the problem PC, I have 2 independent Git installations (one that came along for the ride with GitHub for Windows and one that I manually installed from the Git website).  That means that I have two different config files with different settings, one of which was inconsistent with my main development PC.
    • All good then!
    • Exact identical issue. But I only have one git installed, this plugin works perfectly on another machine. Still don't know the cause though.
      @Laurent: if there's a test build for the line ending stuffs, i would like to give it a try.
    • @dextml: I currently do not have a build for that particular issue, whenever I will I will get back to you
    • @dextml you should try version 2.0 which fix that issue!
  • Visual Basic
    2 Posts | Last post September 01, 2014
    • Hi,
      Is this compatible with Visual Basic? I have installed the extension and dont see any updaes in the toolbar after editing code that is linked to TFS
    • Hi
      It is compatible with any languages and files but it needs to be a Git repository
  • Show Differences
    5 Posts | Last post September 01, 2014
    • I admit my ignorance up front and assume I am missing something obvious.  I have installed this and it works great.  The only thing I can't get working is Show Differences.  I realise this is related to an external Git Diff tools and I have looked at how to set it.
      At the moment I have the source control plugin set to Microsoft Git Provider.  I use SourceTree for my source control and don't have Visual Studio Tools for Git installed.
      Would you mind telling me how to set up a diff engine please?
    • Oh I do have TortoiseGit installed if that helps
    • No worries! I so and so wanted to document that on the wiki so it is a good reminder.   Here it is -
    • Thanks Laurent
    • Welcome! You could have it working then?
  • Color customization
    3 Posts | Last post May 08, 2014
    • Can I customize the decoration colors?
    • Just found it, under "Git Diff Adition/Modification/Removed" in the "Fonts and Colors" option.
    • Nice!
1 - 10 of 11 Items