Git integration
If your Skala documents live in a Git repository, Skala will show you what’s going on with them. You can see which branch you’re on, whether a document has changed, browse the history of a document, and open any previous version.
Skala doesn’t try to replace your favourite Git app. It doesn’t commit, push, pull, or switch branches — we think dedicated Git apps and the command line already do a great job of that. Skala’s Git features are about seeing your design history, visually. To learn more about why we think Git is great for design, visit the collaboration and version control page.
Requirements #
Skala uses the git command already installed on your Mac. If you don’t have Git installed, macOS will offer to install Apple’s Command Line Tools the first time you run git in Terminal.
The Git features only appear for documents that have been saved into a folder that’s part of a Git repository. If Git isn’t installed, or the document isn’t in a repository, Skala quietly hides the Git features.
Skala always uses the copy of Git that comes with Apple’s Command Line Tools or Xcode. Git installed another way, such as with Homebrew, isn’t used on its own.
Status pill #
When a document is in a Git repository, a status pill appears on the right side of the document window’s title bar. It shows the name of the current branch. Clicking the branch name opens the Git history for the document.
If the document has changed, a second label appears next to the branch name.
Modified— The document has changes that haven’t been committed.Untracked— The document hasn’t been added to the repository yet.Changes Available— Someone has pushed newer commits for this document, and they’re ready to be pulled.Push Required— The document has commits that haven’t been pushed yet.
Clicking the label opens the modified document sheet, which shows the document from the last commit and the current document side by side. Each side has its own page popup, so you can compare any two pages. The current side includes changes that haven’t been saved yet.
The status is updated when a document is opened or saved, when you switch back to Skala from another app, and after Skala fetches changes.
Collection windows show the status pill too. In the collection sidebar, each document shows a short status: M for modified, U for untracked, ↓ for changes available, and ↑ for push required.
Further reading: Collections
Git history #
Choose File › Git History, or click the branch name in the status pill, to see the commits that changed the current document, up to the 100 most recent. The list shows each commit’s author, message, date, and short hash. The most recent commit is selected when the window opens.
Selecting a commit shows the author, date, and hash, along with the document’s size, number of pages and layers, and a preview of a page from that version. Use the Page popup to preview a different page.
Click Open This Version to open the selected version as a new, untitled document. The document in your repository isn’t changed, so it’s a safe way to look at old work, or to copy something from an old version back into the current one.
File › Git History is only available when a document window is in front and the document is in a Git repository. Git history is also available for collections, from the status pill, showing the documents that were in the collection at each commit.
Commit author avatars are loaded from Gravatar, using a hash of each commit author’s email address.
The history follows the document through renames and moves, so commits from before a document was renamed or moved are still shown.
Compare with last commit #
Choose File › Compare with Last Commit to open the modified document sheet, the same as clicking the status label in the status pill. It compares the current document with the last local commit, not the remote.
Fetching changes #
While documents or collections are open, Skala runs git fetch for their folders in the background, every five minutes while Skala is the active app. This lets the status pill show Changes Available when someone else has pushed a newer version of a document. Fetching only downloads information about new commits — it doesn’t change any of your files. To get the changes, pull them using your Git app or the command line.
Skala uses whatever Git credentials you already have set up, like an SSH key or a credential helper. It will never ask for a password. If fetching needs authentication that isn’t already set up, it fails quietly, and the status pill won’t show Changes Available.
Saving for Git #
Skala documents can be saved compressed or uncompressed. When saving, set the Compression popup to None (Best for Git) to keep documents as plain XML, so Git can store and diff them efficiently. Xz (Smaller Files) makes smaller files, but Git can’t show meaningful diffs for them.
Further reading: Collaboration and version control and project structure