SourceTree Windows - Push to BitBucket acocunt?

I feel I'm missing something obious here, but I can't seem to find what I'm looking for.

I've created a local repo and would like to push it to BitBucket. I see I can remotes to a project, but I've not created a repo at BitBucket. I was wondering if SourceTree was able to do this? Or - what is the procedure for this?

Also, is there a way for SourceTree to link up with BitBucket and list all my BitBucket repos automatically?

3 answers

1 accepted

3 votes
Answer accepted

Right now SourceTree for Windows doesn't have the ability to call the Bitbucket API to list your repositories and create new repositories, and grab the remote URLs for you. The Mac version does have this, and it will be coming to the Windows version soon.

For now, just create a new repository on Bitbucket via the web interface, then click 'I have code I want to import', then just copy the URL (looks like Then click 'Settings' on the toolbar on your repo tab, click Add to create a new remote, click the 'default remote' checkbox and then paste the URL into the URL / Path box. You can then push to Bitbucket.

It is now a year later :) Any updates to this feature?

BitBucket has been supported for the Windows client for quite a while now.

Great, so I can create Bitbucket repos from Sourcetree?
Any tips on where I find it/how I do it?



EDIT: No worries, found it in File - Clone...

I hope this image explains it:

  1. Click "Clone/New" - ensure you are in the "Clone Repository Tab".
  2. Click the Globe/World icon - it's inline with the "Source Path / URL" field.
  3. In the "Hosted Repositories" diaglog window that appears; Click "Create New Repository...".

3 Steps to complete

Sorry, I'm new to version control, and programming in general.

I got this far, but I don't think it's what I'm after, it seems like the direction is local when I want the direction to be out i.e. push to the web. On the Mac you just go "Publish to remote" and your project (that you created locally can be pushed). How would I do that in the Windows version? Can you even do that in-app yet?

This question is about creating a BitBucket remote repository from inside the Source Tree application. (Note, it requires you to add your Bitbucket account in the application preferences).

Cam Newton, what you appear to be asking is, "How to push to a remote repository?"
In the case of a local git repo that has a corresponding remote repo, which you should have if you followed the image from above. Then you can simple commit your changes with the "Commit" button and then upload your commit to the remote - known as "Pushing" - with the "Push" button.

Hi Zak MO,

Thanks for the quick reply. I apologise if my question is unrelated to the thread topic. I'd just like to make sure by stating my situation. Maybe you can make sense of what I'm trying to ask, as I'm obviously very vague about how the whole thing works!

  • I have made and started work on a new Unity project.
  • I have committed changes locally
  • I wish to push them to my BitBucket account online (without having made a remote repo for this particular project)

What I expected to happen was that I (am able to) hit Push and it detects there isn't a linked remote repo. It would then prompt me to point it to one, or create a new one as part of the one action. Is there something similar where I can do this seamlessly within Sourcetree?

Again, my apologies if my query is off-topic, I'm happy to discuss this in another thread if that's more appropriate!

If you've created a local repo and want to set the remote, I personally do it on the command line:

git remote add origin https://<USERNAME><USERNAME>/<REPONAME>.git

There is probably an option to 'set remote' you can find in the menus of source tree.

Also if your doing a unity project, please put this file in the top directory of your repository:  and call it ".gitignore"

In Unity you also need to Enable Visible Meta files via Edit->Project Settings->Editor.
For git to work with your unity project.

Sadly I'm not a command line kind of guy (i'm likely to do more damage than I am good), so I was hoping for a GUI option. I guess I'll just use the workaround and make a repo first in the web browser.

Thanks for the tips on setting Unity up with gitignore too, I'd already struggled past that hurdle! haha

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,235 views 4 2
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