Keyboard shortcut for getting [the cursor] to the "Commit message" text box?

F.A.R August 20, 2019

Is there a keyboard shortcut for getting [the cursor] to the "Commit message" text box?

If "yes", great. What is it?

If "no", how can I create one (with macOS or via Keyboard Maestro, for instance) ?

If one can't create such a keyboard shortcut within the current Sourcetree constraints, could you please consider adding this capability?

 

Thanks.

 

1 answer

1 accepted

0 votes
Answer accepted
pkamb August 21, 2019

Shift-Command-C

 

This is the menubar command:

 

Repository > Commit...
F.A.R August 21, 2019

Yes, but the behavior of Shift-Command-C is context-dependent.

  1. If you don't have staged files, this shortcut gets [the cursor] to the "Commit message" text box (without further ado). This is nice, because the shortcut places the cursor at the first writable position, so you can continue where you left off if you already have some text there.
  2. If you have staged files and there is text in the in the "Commit message" text box, this shortcut will commit the staged files immediately (and will push them immediately if you have checked "Push changes immediately . . .")
  3. If you have staged files but you don't have a Commit message in the "Commit message" text box, this shortcut will attempt to commit and will warn you that the Commit Message is empty (if you haven't checked "Do not show this message again"). 

It would be convenient to have the possibility of two separate shorctuts that would always behave consistently, regardless of context:

  1. A shortcut that does (1) regardless of the state of Staged Files. 
  2. A different shortcut that does (2) and, if you don't have a commit message, warns you with (3)

Thank you.

pkamb August 22, 2019

Hmm. I cannot reproduce the issues you're having.

For me, Shift-Command-C always moves the text input cursor to the Commit Message box.

If the cursor is already there, it seemingly does nothing (although it does briefly grey out the "Push Changes Immediately" label).

This is regardless of what I have staged.

Pressing CMD-Enter "clicks" the Commit button.

So I do my staging via the mouse, press Shift-Command-C, write my commit message, then press Command-Enter.

I do that all the time, every day. I've NEVER had a problem with Shift-Command-C actually immediately committing the commit.

F.A.R August 22, 2019

We may be running different versions.

I'm running Sourcetree 3.3 (226) on macOS Mojave 10.4.6.

 

I appreciate your comments.

pkamb August 22, 2019

The above was tested on 3.2 on Mojave. I've just upgraded to 3.2.1 and see the same thing.

The app tells me:

 > Sourcetree 3.2.1 is currently the newest version available.

F.A.R August 22, 2019

Oops. Perhaps I used the wrong forum for the Beta versions.

Sorry.

Like pkamb likes this
pkamb August 23, 2019

@F.A.R how did you get into the beta program? Are beta release notes available anywhere? cheers.

F.A.R August 23, 2019

Please see:

https://www.sourcetreeapp.com

(under "Join the Sourcetree Beta Program")

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events