Source Control Using Atlassian Bitbucket
This tutorial shows you how to use source control for your project's Git repositories using Atlassian Bitbucket.
Join the DZone community and get the full member experience.Join For Free
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.
- pull requests with code reviews and comments
- merge code checks
- more add-ons
- team monitoring
create a new account on the atlassian bitbucket site from
. you can also use a social network to sign up.
after the login page, it should appear like the picture below.
create your new project team from navigation header- teams> create teams.
add team members using their bitbucket username or email address and manage the groups.
create your new projects from the navigation header- projects> create project.
select your team or account username on owner list. this project can be accessed only by your team. for that, click privacy check.
create your new repository in the navigation header- repositories> create repository.
make sure to select the repository owner and project in the list. if you need more features, click “advanced settings” and it should expand the page like the picture below.
once you have checked the issue tracking checkbox, if there are any issues in the developing project stage, you can follow the team member suggestions and comments. this can reduce the dependency on external tracking tools.
if you have already built the source code in github, click "import repository," or you may go to the navigation header- repositories> import repository
login to the github site and copy your project url. paste it into the url textbox. after clicking the "import repository" button, the project will locate a bitbucket project list for the selected team.
we have one more option: to upload it directly from visual studio. open visual studio 2017 and create a new project with the name of your choice. i will show the demo as a windows application:
vs 2017>new project >choose windows application
the project will be created like the picture below.
before uploading, the project shows up without a lock symbol.
now, right click above the project and click “add source to source control.”
this action will make the lock symbol appear near all the project files.
then, go to the team explorer window and click the “sync” button under the project.
the first time, it will take you to the “publish” window. select "publish to remote repository," then click “publish git repo.” it shows one textbox copied from the repository url.
paste that in the textbox and click on the “publish” button.
meanwhile, it may ask your login credentials.
now the project source code appears in the repository.
suppose you want to delete the repository; go to the 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 and paste the url to the end of the repository name. then, click the “delete” button. it will automatically remove your repository list.
in this article, we have seen source control using atlassian bitbucket. if you have any queries, please tell me through the comments section.
Published at DZone with permission of Thiruppathi Rengasamy, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.