< Back to Blog

Tower 13 for Mac β€” Introducing Graphite Support

Tower 13 is here! If you are a fan of Stacked Pull Requests, "13" is indeed your lucky number! This update introduces seamless Graphite support for all the most popular actions, allowing you to manage your stacked branches and create Pull Requests without ever leaving our Git client.

Our previous major release laid the groundwork for adding popular Git workflows by introducing Branch Dependency capabilities and the "Restack" action β€” and many Tower users have embraced this new workflow with open arms.

Now, Tower 13 takes full advantage of this foundation to support Graphite tooling, enabling you to integrate changes into your project at a rapid pace.

In this blog post, you will learn more about Graphite and how it is integrated into Tower 13.

About Graphite

If you're looking to improve the Pull Request approval process in your organization and haven't heard about Graphite yet, we think you're missing out!

Graphite provides a stack-based workflow that enables developers to work on multiple features simultaneously by stacking changes on top of each other. This approach is commonly referred to as the Stacked Pull Requests workflow.

The concept is simple: by chaining incremental Pull Requests, there is less code to review, leading to faster code integration and a reduced likelihood of introducing bugs or running into major merge conflicts.

For this approach to be successful, managing branches efficiently is paramount – and that's where Graphite shines! Even if you're the first (or only) person on your team to adopt this workflow, everything will work perfectly right away, so there's absolutely no reason not to give it a try πŸ˜‰

In addition to effortless branch management, Graphite also provides its own interface for code reviews (check out Diamond β€” hot off the press!) and works alongside GitHub, enhancing its functionality.

Apart from the Web UI, Graphite also offers:

You can learn more about Graphite in this blog post. We thought it would be nice to integrate these features into a Git client, so we rolled up our sleeves and built just that.

Let's begin the guided tour!

Working with Graphite in Tower 13

To get started, click the "Workflow" button available in the toolbar and pick the new entry: Graphite.dev!

Tower 13 – Enabling the Graphite Workflow


☝️ Please note that you need to have a Graphite.dev account and the Graphite CLI tool installed (version 1.5.3 or higher).

You will then be prompted to define the "Trunk" branch (usually main) and enter your Graphite token (more info here) and the path to the Graphite binary.

We recommend installing the Graphite binary using homebrew, as Tower should automatically detect it. That said, Tower also supports detection via npm (the standard package manager for Node.js), so it should pick it up as well.

Tower 13 β€” Configure Graphite Workflow
Tower 13 β€” Configure Graphite Workflow


With everything set up, Tower will automatically load the branch information from Graphite by executing the command that CLI Graphite users recognize as gt state in the background.

You may have noticed that the "Workflow" icon has switched to Graphite. By clicking the button, you will be able to quickly access some of Graphite's most popular commands and open the Graphite dashboard in your browser.

Tower 13 – Graphite Workflow in Toolbar
Tower 13 – Graphite Workflow in Toolbar


All right, this is the perfect time to explore the Graphite commands that you can effortlessly run in Tower!

Working Copy

With the Graphite workflow enabled, the first thing you will notice is that there are new options available in the "Working Copy" view.

We've added a new "Create" action that allows you to instantly create a new branch with the staged changes (the equivalent of gt create in Graphite's CLI tool). This is a good practice within the Graphite workflow, as it is recommended to treat each branch as an atomic changeset containing, at least initially, a single commit.

The "Commit" action functions like the gt modify --commit command in Graphite: it adds a new commit to the currently checked-out branch and automatically restacks if necessary, provided there are no conflicts.

Tower 13 β€”
Tower 13 β€” "Working Copy" view

☝️ Tower's "Quick Amend" feature also works with the Graphite workflow. To modify the current branch by amending its commit, hold the Option key (βŒ₯) and the "Commit" button will be renamed to "Modify". This is the equivalent of running gt modify in Graphite's CLI tool.

Creating a Stacked Branch

Graphite is all about Stacked Branches, and creating a new one couldn't be easier: just right-click on the "Branches" view in the sidebar to create a new stacked branch.

Tower 13 β€” Create New Stacked Branch
Tower 13 β€” Create New Stacked Branch


In the next dialog, you can select its parent branch for easy integration and choose to pin it and/or check it out immediately.

Tower 13 β€” Create New Stacked Branch Dialog
Tower 13 β€” Create New Stacked Branch Dialog

Managing Branches

You can also create a new stacked branch by right-clicking on any branch and selecting the preferred option from the context menu.

Additionally, you can perform all other common Graphite operations, such as renaming, merging, squashing, or deleting branches.

Tower 13 – Graphite Commands in Context Menu
Tower 13 – Graphite Commands in Context Menu

Setting the Parent Branch

At any moment, you can change the parent branch of a branch; this works in the same way as you would for Stacked Branches β€” by accessing the context menu and clicking on "Track Parent Branch."

In Graphite terminology, you may know this as "tracking" (gt track) and "untracking" (gt untrack) a stacked branch.

Tower 13 – Setting the Parent Branch
Tower 13 – Setting the Parent Branch

Restacking

Restacking synchronizes all changes by rebasing each child branch onto its parent branch. Tower will display an icon in the sidebar for the branches that require restacking, and you can easily perform this action by right-clicking the desired branch and selecting "Restack [Branch]".

In the branch's history view, you will also notice a yellow banner informing you that the branch needs restacking.

Tower 13 β€” Restack Branch
Tower 13 β€” Restack Branch


In the "Restack Branch" dialog, you will notice a "Restack Full Stack" option. If this option is not active, Tower/Graphite will restack the selected branch and all its parent branches. If the option is selected, the children of the branch will also be restacked (hence the name "full stack").

Tower will notify you of any conflicts that may arise during the restacking operation.

Tower 13 β€” Restack Branch Dialog
Tower 13 β€” Restack Branch Dialog

Syncing a Branch

Right-clicking any branch will also give you the option to "sync" it. As the name suggests, this will synchronize all the branches in the stack, similar to running the gt get command.

Tower 13 β€” Sync Branch Dialog
Tower 13 β€” Sync Branch Dialog


Tower also provides you with additional options, such as the ability to restack all branches in your repository.

Submitting a Branch (To Create a Pull Request)

You can submit a branch (effectively creating a PR) by right-clicking the branch and choosing the appropriate option from the context menu.

You can access additional options by clicking the drop-down arrow, such as updating only the branches that already have open PRs.

Tower 13 β€” Submit Branch to Graphite
Tower 13 β€” Submit Branch to Graphite


All available Pull Requests can be quickly accessed in Tower's "Pull Requests" view, located in the sidebar or by using the shortcut ⌘ + 4.

Tower 13 β€” Pull Requests
Tower 13 β€” Pull Requests


This view enables you to inspect, merge, close, comment on, or check out pull requests without the need to open a browser window.

Merge Queue

Graphite offers a Merge Queue feature that prevents semantic merge conflicts by automating the rebase process during merges. This ensures that the trunk branch remains "green", allowing development teams to progress more quickly with fewer disruptions.

In Tower, if merging is possible, the Graphite branch is added to the merge queue. The merge is performed asynchronously, so be sure to manually refresh and sync the branch afterwards to check if it has been merged.

When a Graphite branch is submitted to the merge queue, it is validated remotely to determine if it can be merged. If merging is possible, it is merged; if not, the process fails.

To run this operation, simply right-click the branch and select "Add [BRANCH] to Merge Queue…" from Tower's context menu.

Tower 13 β€” Graphite's Merge Queue
Tower 13 β€” Graphite's Merge Queue

Warning Messages

While using Tower, you may inadvertently disrupt Graphite's state by performing certain Git operations, such as a git push, shown below.

Tower will alert you whenever this situation may arise before you continue.

Tower 13 β€” Warning Message
Tower 13 β€” Warning Message


These prompts can be enabled and disabled by visiting the "Integration" tab in Tower's Settings.

Tower 13 β€” Integration Settings
Tower 13 β€” Integration Settings

Other Improvements

As usual, we have also taken the time to make some other enhancements behind the scenes.

Here is the list of improvements and bugs that we have worked on:

  • Rounded Avatars: Tower now displays rounded avatars for authors and committers.

We hope you enjoy this release! If you already have a Tower account, switch to the Beta channel to try it out! Simply head over to the "Updates" tab in Tower's Preferences to make the switch.

Happy stacking! 😊

Not a Tower user yet? Download our 30-day free trial and experience a better way to work with Git!




PS: Did you know? Tower Pro is now free for students as well as teachers and educational institutions!

Your Download is in Progress…

Giveaways. Cheat Sheets. eBooks. Discounts. And great content from our blog!