Skip to content
  • Florian 
  • 3 min read

How to control what the File History shows?

This week we have a rather straightforward quick tip about the File History. There are two aspects to it: which files’ history is being shown, and what branch does it show?

How to control the File the history is shown for?

The most common use case for the File History in Kaleidoscope is where you compare multiple revisions of a single file. That’s when it is particularly valuable to select specific revisions from the history sidebar, or to read commit messages.

But there are cases where you are comparing two different files, and both of them each have a Git history. How do I know what is being shown, and how do I control it?

The first one is easy, there is a header area above the history showing the file name. The way to select a different file is through the File Shelf. If not visible, get it via the File Shelf toolbar button or the menu (View > Show File Shelf, keyboard shortcut /).
Bring up the menu of the File Shelf item you want to see the history for, and select Show File History. Now the header above the history should reflect that file name and the history should reload.

Use the menu on a File Shelf item to show the File History of that item.

How to control the branch being shown?

When opening a file from the working copy of your repository, the history from the current HEAD will be shown. If you’re currently working on some feature in a branch, you will see the history of that branch. To be precise: when opening a comparison, the File History shows the history of commits reachable from the first item being opened.

If you want to check the history of a specific branch, tag, …, there’s an easy way. Head to the bottom right of the History sidebar and click the branch button. From the menu that pops up, you can select any HEAD in your repository.

Use the Branch button in the lower right of the File History to select a different branch to show.

Note that there is also access via the menubar, see Navigate > File History > Select Branch > …

While looking at the menu, also take note of the Filter Commits entry and its keyboard shortcut J. It will put your cursor into the Filter Commits field (see screenshot above), allowing you to quickly find a commit by a person, by date, a commit identifier, or finding text in the commit message.

Summary

Changing the file the File History shows is rarely necessary, but can be easily done via the File Shelf. If you want to see the history of a branch other than your current HEAD, change it in the lower bottom toolbar of the File History sidebar.