Here at Sublime HQ we use Sublime Merge every day to manage our Git repositories. As a result we've built lots of features to speed up our development.
In this post we'll share some of the ways we've made it easy to edit and adjust commits.
Editing a commit message
We all do it.
After meticulously crafting a series of commits, you look back and notice a typo in a commit message.
If you're lucky, it's the most recent commit and you can just amend the latest commit. If not, you'll often be tempted to just switch off your computer and call it a day.
With Sublime Merge, editing commit messages is simple:
- Right click the commit you want to edit in the commit graph
- Select
- Type in the new commit message
-
Once you're happy with the changes, press
Shortcut: Ctrl/Cmd+Enter
Dropping a commit
Sometimes you'll make a commit, only to realise you didn't need it. You can easily drop a commit from a branch in Sublime Merge.
- Select the commit(s) you want to drop in the commit graph
Select multiple commits with Ctrl/Cmd+Left Mouse - Right click one of the selected commits
- Select
Squashing multiple commits together
It's common to make a series of commits, only to realise they'd be better off combined as a single commit. Using the squash functionality, you can easily combine multiple commits together.
- Select the commits to squash together in the commit graph
Select multiple commits with Ctrl/Cmd+Left Mouse - Right click one of the selected commits
- Select
Note: This operation will combine all the selected commits, and replace them with an entirely new commit. A force push may be required.
Get Started with Sublime Merge
Sublime Merge is a graphical Git client from the creators of Sublime Text that makes using Git a breeze.
Want to get started? Visit the download page.