See How Others' Changes Compare To Your Own In IntelliJ
Tags: programming, tutorial, productivity, devops
Published: 2022-11-17 16:14:25

Get the ultimate perspective on all the work in progress in your repository and how it compares or *possibly conflicts* with the changes you are making on your own branch with GitLive’s new **Repository View** 🚀

The repository view shows all branches ahead, in terms of commits, of your current branch and the changes on those branches, grouped by author. 



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17uepss80pa0e1rxt4pl.png)

GitLive performs what is known as a [three dot diff](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests#three-dot-and-two-dot-git-diff-comparisons) between your local HEAD (on the left), and the heads of all the remote branches in your repository (on the right), to populate the tree in the repository view.

This shows you all the changes between the *common ancestor* of your current branch and each remote branch, similar to what you would see in a PR on GitHub.

### Know when your branch falls behind

When the default branch or your remote tracking branch is ahead of your current branch they show at the top level of the tree.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0lq1c3rx5yimr6dx7iqv.png)

As you can see, these let you know how many changed files you need to pull, and as you probably already know, it’s good Git hygiene to pull these changes sooner rather than later!

### Sharing working tree changes

With GitLive you can see the unpushed changes from local clones of your repository when you have signed in and you and your fellow contributors have chosen to share working tree changes.

As mentioned above, GitLive performs what is known as a three dot diff between your local HEAD (on the left), and the heads of all the remote branches in your repository (on the right).

You can customize this diffing process by changing what is used as the *left* and *right* sides in the diff via the view options in the tool window toolbar in IntelliJ.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3r8oszcf21mwvb7gleq.png)

The options available for **left** and **right** in the tree are the following:

<table>
  <tbody>
  <th>Left</th>
  <th>Right</th>
  <tr>
    <td>
      <p><b>Common ancestor.</b> Selecting this for the left will <em>include</em> all changes pushed to the remote in the diff of the branch.</p>
      <p><b>Their remote branch.</b> Selecting this for the left will <em>exclude</em> all changes pushed to the remote in the diff of the branch.</p>
    </td>
    <td>
      <p><b>Their remote branch.</b> Selecting this for the right will <em>exclude</em> any local changes not yet pushed to the remote in the diff of the branch.</p>
      <p><b>Their working tree.</b> Selecting this for the right will <em>include</em> any local changes not yet pushed to the remote in the diff of the branch.</p>
    </td>
  </tr>
  </tbody>
</table>

An asterisk appears on the icon of any branch or file with *working tree changes* and it’s possible to see the same branch multiple times in the tree if multiple clones exist.

### Switching between repositories in your workspace

Use the team selector to switch to a different repository view if your project or workspaces comprises more than a single repository. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tm802fmm1x046bdt2jc.png)

The popup lists all the organizations and repositories found via the remotes of the local clones in your project or workspace.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e62grz61sooypg8oi4ee.png)

Finally, you can also select the owner of the repository to show the *organization view*. It lists all the branches ahead of the default branch, grouped by author, for every repository in your organization. 

It's great to review all work in progress across your whole organization but depending on the size that can be a lot of information!

***

Don't have the GitLive extension installed yet? You can find it [here](https://plugins.jetbrains.com/plugin/11955-gitlive), and if want to learn more about the latest release, check out [this blog post](https://blog.git.live/gitlive-16.0-easily-see-how-others-changes-compare-to-your-own-with-the-new-repository-view).