SourceTree

Draft your commit messages in SourceTree 1.4

By on May 22, 2012

Another useful new feature introduced in SourceTree 1.4 is the ability to draft your commit messages as you work, potentially long before you hit the commit button. This feature lets you jot down any information you want to include in the commit message later, without having to remember it!

To start, click the new button at the bottom left of the repository window or press the keyboard shortcut ⇧⌘D.



In the pop-up window, draft the contents of your next commit message:


When you’re finished, just press Escape or click somewhere outside the pop-up. The draft commit is saved along with your repository, so it will persist even if you close SourceTree. You can refine the message whenever you like, and of course when you finally do open the commit dialog, your commit message will be automatically populated with your draft, to be committed as-is or refined one last time.

Draft commit messages were added in 1.4 to help streamline your work process, we hope you like this feature!

  • http://twitter.com/tuan_kuranes tuan kuranes

    Love the idea.
    Spawns multiple ideas on the commit message subject, you surely already thought of, but nonetheless:
    - Could be interesting to note first edit and commit time for statistics reports. (task time estimation), or even just add the ability to hook that to some task manager (jira, basecamp, etc)
    - Along with recent message button, might be interesting to address some commit guidelines  or propose them as “fill-in template” or even forms-like: 
    https://github.com/hpcc-systems/HPCC-Platform/wiki/Git-commit-message-guidelines 
    - a tweakable commit message checker (forbids duplicate message, empty message, “fixes” messages, etc.)

    • Anonymous

      I’m not a fan of collecting stats on developers activities, I think it skews behaviour in ways that aren’t practically useful. However the template idea is on my list – actually if you manually supply a git commit template that’s honoured in the commit window already, but you can’t define these yet. Defining pre-commit hooks – a possible one for the future :)

  • http://zerokspot.com zerok

    Great feature! Thank you :-)

    This will finally lead to me not having to look through every single line of code before doing the actual commit in order to document precisely, what I’ve changed, simply because I can now do that when I make the change :D

  • Max Nanasy

    I didn’t even realize that the lower-left bar existed before this post :O

  • Arialdo Martini

    I love this feature. I systematically use it.
    This seems to be the perfect tool for a technique I and my colleagues are using, and which we called Preemptive Commit Comments http://arialdomartini.wordpress.com/2012/09/03/pre-emptive-commit-comments/