Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Is there a Step by step instruction creating a Bitbucket repo from a Visual Studio project?


A few years ago I finally managed to have a few VS solutions in the Bitbucket cloud and from time to time I even succeed to commit changes to it (I've got a long list of issues trying to do that but that's another story).

Now I have a new solution which I want to have as a Bitbucket repo so I can commit changes from within Visual Studio and (but that is also a next step) I want to synchronize changes with a fellow programmer.

In VS I have a Bitbucket Extension and I am logged in. I open my solution and from the tab Team Explorer, icon Manage connections. Now I've got 2 options:

1 I can click Clone from this extension. What I see is existing repos in the cloud. So apparently that won't get me anywhere.

2 I can also click Create. I enter the name (=the name of the solution), no description, and as I have to enter a local path I select a directory e:\BitBucketRepo. In the TeamExplorer I can see The repository was cloned successfully. Create a new project or solution in this repository. In the output window it says E:\BitBucketRepo Cloning into 'E:\BitBucketRepo\Projectname
Warning: You appear to have cloned an empty repository.

Why? What did I do wrong?

A subdirectory has been created in e:\BitBucketRepo with the name I've chosen and there is a repo added in the cloud. But they all seem empty. I can't click in the Git Changes window and I can only stop VS confirming that an active modal dialog is open (which is nowhere to be seen).

3 When I restart I see, in the lower right corner of VS Add to source control while in an earlier project I see the name of the project, master and the changes on which I can click to push to the Bitbucket repo. So apparently the above was not enough to get my project under source control.

I tried what was working earlier, according to my notes: File/Add to source control. But then I have to create a Git repository in GitHub (which I try to avoid by using Bitbucket). When I click Existing remote and enter the URL of my cloud Bitbucket Repo, I can't select Create and Push (greyed out). When I also enter the local Git repository and enter the local path  of step 3 it says it already exists. This is not going to work.

So what step do I miss to get my whole project under Bitbucket source control, commit changes to my local directory and push it from the Git repository window to the Bitbucket repo?

EDIT: I found out that the .git directory of the solution I created in e:\BitBucketRepo didn't serve any purpose. The VS solutions where it worked had the .git directory within the solution.

I prevented that because 1) it seems logical to me to have the local repo on a separate disk and 2) in one of the attempts to get this working, using the solution's directory VS was overwriting all my project files (without warning) with .git files. Fortunately I made a backup as I do not trust VS anywhere. Not sure how to do this right but apparently I need to have it there.

At least one major question remains. I copied the earlier .got content within the project and I see the red icons when something is changed and they disappear when I right click somewhere in the solution, Got/Commit/Commit or Stash. So far so good.

But now, when I click on the lower right git symbol with my project's name (this opens the Git Repository) I do not see a Push option (to get the changes to the Bitbucket cloud).

I can now choose Git/Push to Git service, then select Existing Remote, and push from there, but I have to do that every time again.


1 So what can I do to push changes to the bitbucket repo easily? It works in 1 solution, see lower picture and not in the other one, see upper picture.

Push options missing.jpg

2 What should I do differently in the above steps?

I appreciate any help.






1 answer

The fact that nobody, not even someone from Atlassian, cared to reply here makes me wonder what the value of Bitbucket is above Github.

Originally it was free for 5 users and private repos while Github wasn't. But that changed.

The only reason I can think of is that Bitbucket isn't Microsoft....

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,086 views 2 9
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