Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is SourceTree too aggressive in pushing branches?

Deleted user October 20, 2011

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

0 votes
Answer accepted
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 22, 2011

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?

Deleted user October 31, 2011

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 Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events