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

Not able to commit code from sourcetree to bitbucket on Mac

Anubhav Nidaria January 31, 2020

Whenever I push empty branch from sourcetree to bitbucket, it gets pushed but remote branch automatically gets deleted after sometime. When try to do code commit, it doesn't happen at all. I have tried removing and again adding my account in sourcetree settings. I don't get any error dialog of any sort. Checkout and pull is working fine. Any suggestions I can try ?

1 answer

0 votes
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 1, 2020

Hello @Anubhav Nidaria,

Thanks for reaching out.

What do you mean by an empty branch? A branch in Git is a pointer to a commit, it is never empty.

No branches in Bitbucket are ever removed automatically, it can only be done by the user (explicitly or in a pull request by enabling the checkbox to close the source branch when PR is merged). If you mean that the branch you pushed doesn't appear on the Branches list screen in Bitbucket, you probably have the filter set to Active branches at the top of the list. If you switch it to Merged branches, you will see the branches that have no differences with other branches, or if you can switch it to All branches to see all branches together.

I'm not sure about Sourcetree, it might have similar filtering logic when listing branches.

When try to do code commit, it doesn't happen at all.

What exactly are you doing and what error do you get back? It might shed some light on what is going wrong.

Cheers,
Daniil

Anubhav Nidaria February 2, 2020

Thanks for the reply Daniil. What I meant was I create a branch and without making any code changes, I push it and it starts appearing in remotes. But after sometime, it does not appear in remotes list. I see the same thing on my Jira tickets as well, I see the branch for some time after that no branch is displayed.

The bigger problem though is rebase option. The rebase seems to happen without any issues in sourcetree. But when I check my branch in bitbucket, it still shows behind the target branch. So the force push I do after rebase are not reflecting in bitbucket at all.

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2020

Well, as I said, nothing is removed automatically. Is there anyone else working on the same repository? Maybe someone prunes merged branches so that they don't pollute the branches list?

But when I check my branch in bitbucket, it still shows behind the target branch.

Isn't it because the target branch is updated by someone else after you rebase and push? I don't have other ideas, so if this is not the case, please open a support case and point to the actual repository where the problem occurs, and our Support team will look into that.

Cheers,
Daniil

Anubhav Nidaria February 4, 2020

Thanks @Daniil Penkin , I'll follow the directions as suggested.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events