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 Freewhat 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 a new account on the atlassian bitbucket site from
here
. you can also use a social network to sign up.
after the login page, it should appear like the picture below.
step 2
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.
step 3
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.
step 4
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.
step 5
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.
step 6
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.
step 7
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.
happy coding...
Published at DZone with permission of Thiruppathi Rengasamy, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments