<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Felix Zumstein</title>
    <description>The latest articles on DEV Community by Felix Zumstein (@fzumstein).</description>
    <link>https://dev.to/fzumstein</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F127588%2F6498c8a4-34c9-4c54-83ee-1423c6dd8610.jpeg</url>
      <title>DEV Community: Felix Zumstein</title>
      <link>https://dev.to/fzumstein</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fzumstein"/>
    <language>en</language>
    <item>
      <title>How to diff Excel VBA code in SourceTree (Git client)</title>
      <dc:creator>Felix Zumstein</dc:creator>
      <pubDate>Mon, 21 Jan 2019 14:58:04 +0000</pubDate>
      <link>https://dev.to/fzumstein/how-to-diff-excel-vba-code-in-sourcetree-git-client-36k</link>
      <guid>https://dev.to/fzumstein/how-to-diff-excel-vba-code-in-sourcetree-git-client-36k</guid>
      <description>&lt;p&gt;If you rely on Excel for your daily work, your folder most likely contains a lot of different versions of the same file like "myfile_final_v2.xlsx" or "myfile_final_final.xlsx" (you don't want to inadvertently mess up your file, do you?).&lt;br&gt;
In case you know how to use &lt;a href="https://git-scm.com" rel="noopener noreferrer"&gt;Git&lt;/a&gt; version control, using it to track your Excel files is an easy decision to make. This will save you from having to rename your files locally all the time and will give you the option to add a commit message so you know what's going on.&lt;br&gt;
However, it won't take long before you'll miss one Git's core functionality: the "Git diff" feature. For Git, an Excel file is just a binary file and you can't see what changed from one version to the other.&lt;br&gt;
Turns out if you use SourceTree, this is now an easy-to-solve problem for your VBA code! &lt;/p&gt;

&lt;h1&gt;
  
  
  SourceTree
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.sourcetreeapp.com" rel="noopener noreferrer"&gt;SourceTree&lt;/a&gt; is Atlassian's popular free GUI application for Git, made for users who prefer a desktop application over a the command line. Needless to say, SourceTree doesn't behave differently from any other Git platform or GUI client: it doesn't show you diffs for Excel files out of the box:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4rpjobolt2qf6n2h1twz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4rpjobolt2qf6n2h1twz.png" width="770" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's see how we can fix this!&lt;/p&gt;

&lt;h1&gt;
  
  
  Git XL
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.xltrail.com" rel="noopener noreferrer"&gt;xltrail&lt;/a&gt; is a version control platform for Excel files and works similar like &lt;a href="https://github.com" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, &lt;a href="https://bitbucket.org" rel="noopener noreferrer"&gt;BitBucket&lt;/a&gt; or &lt;a href="https://gitlab.com/" rel="noopener noreferrer"&gt;GitLab&lt;/a&gt; with the difference that xltrail understands the content of Excel files.&lt;br&gt;
While xltrail allows you to integrate with all of these Git providers, it also offers a free and open-source Git extension &lt;a href="https://www.xltrail.com/git-xl" rel="noopener noreferrer"&gt;Git XL&lt;/a&gt; that allows you to diff and merge your VBA code locally either on the command line or most recently also through SourceTree.&lt;br&gt;
You can download Git XL &lt;a href="https://www.xltrail.com/git-xl" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Note that you do not have to open an account to be able to use it. After clicking your way through the installer, you can activate the extension either globally for all repos (&lt;code&gt;git xl install&lt;/code&gt;) or for specific repositories only (&lt;code&gt;git xl install --local&lt;/code&gt; while being in a specific repo). For details see the instructions &lt;a href="https://www.xltrail.com/git-xl" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
If you now head over to your command line and run a Git diff command, it'll happily show you what changed in your VBA code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4oxogh5xqr2n0o3se3dk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4oxogh5xqr2n0o3se3dk.png" width="750" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  SourceTree with Git XL activated
&lt;/h1&gt;

&lt;p&gt;Once Git XL is installed and activated for your repository, head back to SourceTree where you are now able to see uncommitted diffs in your VBA code without having to change anything in the settings:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswvdjx8wg8j8dsorcjc4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswvdjx8wg8j8dsorcjc4.PNG" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>excel</category>
      <category>github</category>
      <category>bitbucket</category>
    </item>
  </channel>
</rss>
