

I’ve also seen commit histories where commits for feature X were scattered around and interleaved with commits for feature Y, making it hard to get a sense where feature X is at in its development. Once upon a time, I got into trouble because the commit history of a repository clearly showed that I was working on feature Y before feature X, contrary to the project plan.
SUBLIME MERGE REBASE UPDATE
In fact, you really ought to update the commit message in such cases so that it’s clear to everyone what the commit now contains. Rewording commit messages is also useful after you’ve added staged changes to an existing commit. A window will pop into view where you can tweak or completely replace the commit message. Rewording commit messages lets you tell the story in a way that your colleagues (and your future self) will be able to make sense of.ĭouble-click on the “Description” column in the interactive rebase screen. When you’re in the middle of solving a problem, you don’t know how the whole story will read. When rebasing continues, it will drop back out to Sourcetree, allowing you to do whatever the heck you want before continuing on.

To use this feature, check the “Amend commit?” checkbox on the commit you’d like to edit. But the git commit – -amend command lets you do things like change the commit message or add staged changes to a previous commit. Or, you can use the squash with previous option by right-clicking or using the button at the bottom of the dialog. To use the squashing feature in Sourcetree, drag and drop rows on top of one another. Squashing lets you combine tiny-yet-related commits into a single, meaningful commit. Panic commits tend to be small and, taken in isolation, rather trivial. Squashing is a nice way to tidy up after a series of “panic commits” – when you write a line of code, then are overcome by fear of a sudden widespread power shortage resulting in the loss of your work. From there, you’ll have the chance to rewrite your repository’s history with the help of a few operations.
