It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I select/deselect files to commit with the keyboard?

Hi,

Previously (and currently) using the TortoiseHg client for Windows, which is my past experience with Hg. In that client, you can go through your list of files before commiting and press the Space key to select which ones to commit.

In SourceTree, I don't seem to find the keyboard shortcut for this. It is just me or is this function not supported?

(I tend to prefer by working with keyboard rather than mouse as much as possible.)

2 answers

If you're working in 'staging' mode (the default) you can stage files for the next commit by pressing Ctrl-Shift-+ (combine with shift-keyboard or ctrl-a to do many at once)

Thanks Steve. However, as my question subtly implied, I am not using Git - our repos are using Mercurial. Is there any way to do the same thing when working in Mercurial mode?

Ah, sorry when you mentioned Windows I immediately thought our Windows port (which is git only for the moment). At the moment you change the checkbox state via the keyboard, sorry.

On the Mac the shortcuts are:

Command-Shift-+ (plus): stage selected files for commit (use the '+' key above '=', not the numeric keypad '+')
Command-Shift--  (minus): un-stage selected staged files

These work in the log view and the file status (commit) view.

There are also shortcuts for selecting files:

Command-A: select all files
Up arrow, Down arrow, space bar: move to and select files

Unfortunately the keys for selecting files only work if the keyboard focus is on the files pane. I can't figure out a way to put focus on that pane from the keyboard. So close! Urgh.

 

There could be a way to focus on that pane (files ot staged) and also switch to other panes... nothing seem sto work.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,935 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you