Disable automatic push after commit

Hi, I am quite new to SourceTree that I use to manage my code using Bitbucket.

I believe I understand the behaviour of commiting, pushing, and so on. But when I commit a change to my code using SourceTree, (and I don't push it), I see that it is automatically pushed to the remote server a few seconds after.

Is there an advantage for that ? I thought that commiting and pushing were separated to allow the user to work locally and modifying the remote server less frequently.

I think it is a better practice to do so, and therefore would like to disable the automatic push after commit, except if you convince me of doing the opposite :) (no, I did not check the box next to the commit field to ask for automatic push).

Thank you for your attention and have a good day.

2 answers

1 accepted

2 votes
Answer accepted

There is also a checkbox in Options for "Push to default/origin remote when committing".

Oh, yes ! I don't know why that box was checked. Thanks !

I would have expected that box to cause the equivalent box in the commit dialog to be checked by default, so you could override it for specific commits, but it sounds like that's not the case. Glad you solved it!

All of a sudden this box is checked by default on every commit and it is really causing a lot of havoc for me. I've looked through the settings and unless I missed it, don't see any way to change the default. 

In the answer above, I mention the exact text of the only option relating to this. It is in the "General" tab of the options dialog (at least, it is on Windows). In my experience, this setting is not absolute. I think when it is off that the application sometimes remembers whether it was checked in a previous commit. If behavior is not consistent, you can search for or submit a bug at jira.atlassian.com

Yes I see the checkbox is there, but it appears to be checked every time I go to commit, regardless of whether I unchecked it previously. So if I forget to uncheck it every time I run the risk of auto-pushing mistaken commits.

I also frequently run into this issue - I have unchecked the box in the options menu as well as in the commit dialog, but for some reason it becomes re-checked in the commit dialog from time to time. Luckily I have only been making commits on non-master branches, but this means I have to keep deleting branches from the online repo that should not be there in the first place. It would be really helpful to be able to remove that (expletive) checkbox entirely from the commit dialog. I don't ever want to auto-push, and I don't want the option right there to be accidentally or automatically ticked randomly while I am working.

Another quick point: clicking anywhere along the ENTIRE bottom pane between the 'Push changes immediately' checkbox and the 'Commit' button toggles the checkbox, making it extremely easy for users to tick it by accident and not even realize it, because they are trying to click on the commit button.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

312 views 0 12
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