In SourceTree when a try to select and commit a single file - I have to manually move the file to staging. When I have more than one file selected I can commit straight away. In the second case I assume the move to staging/index happens behind the scenes.
Is there method to this madness or is it just a bug?
The toolbar Commit button tries to be smart about what you intended - because browsing the diffs is done with a single-file selection (also the default), it can't really assume that you meant to jump directly to committing that one file. Since multi-selection is a much more explicit action, it assumes you did in fact mean just the current selection.
If you want SourceTree to always jump directly to committing even single-file selections, use the Commit Selected option instead. This is on the menu, and you can also customise the toolbar to use the alternative Commit Selected button too instead of the assumption-making Commit button. Also, right-clicking the file and selecting Commit always works in the context of that one file.
Lastly, if you don't like using staging, you can turn it off completely if you prefer. In Preferences > Git, uncheck the 'Use the staging area' checkbox, and all commits will be direct from your working copy in future.
Perfect. I appreciate the answer. I suspect I'm not the only one confused by this little detail. However I've always found GIT a bit confusing. In this case I just decided for my needs that staging is overkill - a few people running a small business, we almost always have access to our server. From this point of view staging is just a complication.
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot