Git Comparison Projects

Abstract: You can now create Understand Comparison Projects directly from git.

If you have been keeping up with the blog, articles such as these might have given you a hint that Git Comparison Projects were coming:

Git Comparison Projects are finally here! So what are they?

Regular Comparison Projects have been available in Understand for a while. With a comparison project set, you can:

  1. Compare the entities in your current project to the entities in the comparison project with the Changed Entities Locator.
  2. Use the “Compare” variant of most graphs to visualize what has changed. 

I am reluctant to admit it, but Kevin already wrote a great article describing these features: Visualizing Change.

The limitation with comparison projects was that you had to create a complete copy of your source tree for the second project. Git comparison projects overcome this limitation by reading files directly from Git. 

To set one up, use the “Compare Menu” to access the soon-to-be-named “Comparison Projects” option (this might be named “Compare Projects” in your current build). This opens a panel with your comparison projects:

The Comparison Projects panel.

The toolbar options from left to right are:

  1. Create a new comparison project from Git.
  2. Open a project on disk to use as a comparison project.
  3. Close the open comparison project. This may be necessary to analyze the comparison project in another instance of Understand or from the command line.
  4. Analyze the comparison project.
  5. Remove the comparison project from the list of comparison projects.

Clicking Create will bring up this dialog:

New Project from Git dialog

The new project will use the current project’s settings except that files will be read from Git instead of from disk. You can also create multiple comparison databases and switch between them with a double-click. The list is most-recently-used order:

Comparison Projects panel with multiple projects

Git comparison projects are complete Understand projects. In addition to the comparison features available, you can also open the projects directly to browse the code at that point in history with all the “Understand Goodness.”

A Git project opened in Understand works as a normal database except all editors are read-only.

I’ll freely admit that like “De-Mystifying Dependencies” this article is more of a support article on the existence of a feature than a true blog post. To find out why I wrote it anyway, check out this article about our friendly competition. And, for more technical articles on Git, try: