Setting up a repository ~ Atlassian Bitbucket

February 03, 2019
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 furher 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 one time activity).

     7)    Click on Create and Create New Repository


6         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 git repo
  

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






                                                                                                                               credits : akur jain



No comments:

Powered by Blogger.