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!

8 Comments

  • Posted May 22, 2012 at 2:44 pm | Permalink

    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
      Posted May 23, 2012 at 9:25 am | Permalink

      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 🙂

  • Posted July 13, 2012 at 2:12 am | Permalink

    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 😀

  • Max Nanasy
    Posted July 24, 2012 at 1:18 pm | Permalink

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

  • Arialdo Martini
    Posted February 17, 2013 at 2:07 pm | Permalink

    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/

  • Ian Thomas
    Posted August 8, 2013 at 4:14 am | Permalink

    How do I get this feature? I’m running 1.0.8 which as far as I can tell is the latest version.

    • Anonymous
      Posted August 8, 2013 at 7:15 am | Permalink

      This blog post is for the Mac version, it pre-dates the Windows version. There’s no dedicated pop-up for this on the Windows version yet, but you can actually just pop up the commit dialog (Ctrl+Shift+C) and type in there, the contents will be saved even if you press Esc to drop back to the normal window and will be there when you come back to the commit dialog later.

      • Ian Thomas
        Posted August 9, 2013 at 9:28 am | Permalink

        Thanks. I didn’t even realise they weren’t the same.