Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

HOWTO Get local code base with SourceTree 3.0.6 to Bitbucket as-is. Step #1.


Please help,


We are just starting with Bitbucket, and need to get our local code base to Bitbucket.

We can log into the link for where we want our code base to end up, but all efforts to get SourceTree to upload our local code base to our repo is failing, and Source Tree only shows a huge blob of text in the "Committing" screen, that ends with the error "Completed with errors, see above.".

All on-line documentation for Bitbucket, and SourceTree is not helping, as they all seem to be out of date, as version 3.0.6 for SourceTree does not have any of the same screens as documentation anywhere.




3 answers

1 accepted

0 votes
Answer accepted

I have the solution to this.

Bitbucket/SourceTree out-of-the-box with SourceTree's GUI , does not allow one to go from local first to repo. Others have posted many complaints of this, but this is SourceTree/Bitbucket out of the box, as of SourceTree 3.0.6.

One must start with 1st, create their repo there. There i no way around this with the out-of-the-box GUI for SourceTree.

After creating the repo, go to your local file system, and temporarily rename you code base's root folder, then create a new empty folder.

Go into SourceTree, choose Clone repo, and point it to the newly created empty folder.

Then go back to your local file system, and copy/move the sub-folders from the temporariliry renamed folder to the empty one.

Then you can commit/push the files (not empty folders), files, which will get their folder, to the repo.

Thank you for the response. 

We did the steps you mentioned for SourceTree, and they lead to the error "Completed with errors, see above".


As for the command line options, we must stick 100% to using the GUI in SourceTree. 

Our team has non-technical people, and if we have to even slightly consider using any kind of command line, for anything, we will have to consider other repo tools.

Here is the full text of that error when we try to push to the repo, with the senstivie data obfuscated with ~~~~~


comparing with https://~~~~~~/csc.get

abort: HTTP Error 404: Not Found


When using SourceTree to click on the menu "Repository" and then choose "View repository online" works.

0 votes
minnsey Atlassian Team Oct 22, 2018


I'm assuming you created the repository in the Bitbucket web site and that your local code is not managed in git already?

In Sourcetree for Windows, in the New Tab/Create panel, you can select to your existing folder as the Destination Path, unselect the Create Repository on Account option and then click Create.

This will effectively run git init against your folder.

Once Sourcetree has opened the tab for the repository you can open Repository Settings behind the cog upper right and add the remote of the Bitbucket repository you want to use.

you should then be able to add your existing files, commit and push to Bitbucket.

Alternatively these are command line  instructions here

if you code is already in a local git repo then in Sourcetree you can add the existing repository and then set the Repository Settings.

Or use the command line options here


Suggest an answer

Log in or Sign up to answer
Community showcase
Published 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...

7,091 views 5 13
Read article

Community Events

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

Events near you