Is SourceTree too aggressive in pushing branches?

We've recently switched everyone at our company over to using SourceTree and in general it seems like a vast improvement except that we think the push behavior might be too aggressive. This manifests itself in two ways

  1. When you click commit and then check the "Push commits immediately to ..." we expected it to be the equivalent of a commit and push only for the current branch. However, it seems to push ALL branches.
  2. When you click Push the drop down dialog has a list and new branches are automatically checked.

This has resulted in new branches being pushed to a shared hosted repository accidentally. Since git encourages small batches of work and frequent branching and merging it seems reasonable for people to have multiple streams of work in progress as they switch from task to task. Defaulting to include all branches is counter-intuitive and it would make more sense to only push the current branch instead.

Does this line of thought seem reasonable?

Thanks,

chuck

1 answer

1 accepted

Hi Chuck,

Fair point - it's been raised already that 'Push immediately..' in the commit dialog really should only push the current branch, and I intend to change that in future: https://jira.atlassian.com/browse/SRCTREE-715

As for the main Push dialog, the auto-checking is done for branches that are tracked only. If new local branches are being automatically checked, it's because they are configured for tracking. You can check this by performing 'git remote show <remotename>'.

I just did a few tests here, and new branches created in SourceTree were not automatically checked in the push dialog, and 'git remote show' did not include them in the section "Local refs configured for 'git push'". The only case when SourceTree auto-checked them was if they appeared in that section. Maybe something in your workflow is causing them to be set up as tracked branches?

Indeed you are correct on the new branches not automatically being checked in the push dialog. I think it must be our workflow and we're looking to update it accordingly.

Thanks for the speedy response and we'll look forward to the update.

Suggest an answer

Log in or Join to answer
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 ...

241 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot