Setting Up Code Repository with Bitbucket


Setting Up Code Repository with Bitbucket

Bitbucket is a web-based version control repository hosting service owned by Atlassian, for source code and development projects that use either Mercurial or Git revision control systems.

In this blog, we are going to learn how to create our first code repository in Bitbucket and do the code check-in into that.

Before going further I assume we have git Bash already installed in our local machine. If not we need to install git Bash from this link.

Now we need to follow below steps to setup account into Bitbucket:

1)    Click on link https://bitbucket.org/product and create your account on Bitbucket and login into that.

 2)     Now login into your Gitbash command prompt and type ssh-keygen to generate ssh key.                        


3)     Press enter to accept the default key and path


4)     Enter and Renter Passphrase when prompted

Please note your SSH Key would be generated inside 
c/Users/Users Name/.ssh/id_rsa

5)    From Bitbucket Account, choose Bitbucket settings from your avatar in the lower left. The Account settings page opens. 


     6)    Under Security àSSH Key we need to add the SSH Key generated in step 4.(Please note this is only a one-time activity).

     7)    Click on Create and Create New Repository
    
       Now to do Code-Check in into Bitbucket we need to follow below steps:

      1)    We need to again login into Git Bash and move to the path where code is kept.

      2)    Initialize Git using git init.


      3)    To add the source code git add –all


      4)   To Commit Code git commit –m “Commit Message” 


      5)   git remote add path of the git repo
  

      6)   git push –u origin master to finally push code into Bitbucket







SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post