Sourcetree commit

Why if I click on the button Commit on the top bar in the commit window I cannot select any files under Working Copy changes..

but if I right-click on the files and then from the submenu click on Commit the file are correctly selected...

is this a bug or it's a feature ? Is there a preferences to setup this? I'd like to click on the big button COMMIT Instead of selecting the files and the right click and then Commit..

3 answers

1 accepted

Hi Ned,

You have to stage files before you can select them, that's why they're not selectable. This is a basic Git concept (check out the 'git add' section in Atlassian's docs: https://www.atlassian.com/git/tutorial/git-basics#!add).

It sounds like you want a more basic workflow instead of having to stage files. If this is the case you can go into your SourceTree preferences and turn off 'Use the staging area' which will always allow you to select entire files rather than having to stage them.

Hope that helps

no no, I don't need to add the file, I'm talking about file that are ALREADY under GIT.

But I see that if I disable the 'Use the staging area' it works.. Thanks

Even if the file is already in Git, you have to stage it. You can't commit the file if it isn't staged, this isn't the way Git works. Disabling the staging area is just providing Git explicit options to say "commit these files". It's important to understand this as it's a fundamental part of Git. Take a look at the tutorial I posted above to understand the staging area.

ok, I see. Thanks for the explanation and the help

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you