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 ?
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.
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.
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.
Hi everyone, We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events