Source Control Using Atlassian Bitbucket

bitbucket
What is Bitbucket?

Bitbucket is a web based hosting service that distributes source code and development projects. They are offering free accounts for up to five members in a single team and we can create an unlimited number of private repositories. We can upload the source code from GitHub and Visual Studio.

Features

  • Pull requests with code reviews and comments
  • Merge code checks
  • Tracking
  • Wikis
  • More add-ons
  • Team monitoring

Step 1

Create new account on Atlassian Bitbucket site from here. For signing up, you can use a social network also. After login page, it should appear like the below picture.

bitbucket

Step 2

Create your new project team from navigation header -

Teams> Create Teams.

bitbucket

Add team members using Bitbucket username or mail address and manage the groups.

Step 3

Create your new projects from navigation header

Projects> Create project.

bitbucket

Select your team or account user name on Owner List. This project can be accessed only by your team. For that, click privacy check.

Step 4

Create your new repository on navigation header -

Repositories> Create repository.

bitbucket

Make sure to select repository owner and project in the list. If you need more features, click “Advanced settings” and it should expand the page like below picture.

bitbucket

Once you have checked the Issue tracking checkbox, if there are any issues on developing project stage, you can follow the team member suggestion and comments. It may reduce the dependency on external tracking tools.

Step 5

If you have already build the source code in GitHub, click import repository or you may goes on to navigation header -

Repositories> Import repository

bitbucket

Login to the GitHub site and copy your project URL. Paste it on the URL textbox. After clicking import repository button, the project will locate as bitbucket project list for selected team.

Step 6

We have one more option, i.e., to upload it directly from Visual Studio. Open Visual Studio 2017 >> create new project with a name of your choice. I will show the demo as Windows application.

VS 2017>New Project >choose Windows Application

bitbucket

Project will be created like the below picture.

bitbucket

Before uploading, the project shows without lock symbol.

bitbucket

Now, right click above the project and click “Add Source to Source Control”.

bitbucket

This action will make the lock symbol near all the project files.

bitbucket

Then, go to team explorer window and click “Sync” button under the project.

bitbucket

The  first time, it will take you to “Publish” window. Select "publish to remote repository", then click “Publish Git Repo”. It shows one textbox copied from the repository URL.

bitbucket

Paste that in the textbox and click on “publish” button.

bitbucket

Meanwhile, it may ask your login credentials.

bitbucket

Now, project source code appears in repository.

bitbucket

Step 7

Suppose, you want to delete the repository; go to Settings menu then scroll down to the bottom of the page. Locate the “Delete Repository” button. Once you click the button, a popup window will appear.

Copy & paste the URL to the end of the repository name. Then, click “Delete” button. It will automatically remove your repository list. 

bitbucket

Conclusion

In this article, we have seen source control using Atlassian Bitbucket. If you have any queries, please tell me  through the comments section.

Happy Coding.

Up Next
    Ebook Download
    View all
    Learn
    View all