Ubuntu: How To Use Bitbucket

Published On: 22 January 2021.By .
  • Quality Engineering

Description-

Learn to push and pull code on bitbucket

Definition of Bitbucket-

Bitbucket Cloud is a Git based code hosting and collaboration tool, built for teams. It provide one place for your team to collaborate on code from concept to Cloud, build quality code through automated testing, and deploy code with confidence.

History of Bitbucket-

Bitbucket was previously an independent startup company, founded by Jesper Nøhr in 2008. On 29 September 2010, Bitbucket was acquired by Atlassian. In September 2015, Atlassian renamed their Stash product to Bitbucket Server. In July 2016, Bitbucket added support for Git Large File Storage (LFS).

Take Code From The Bitbucket-

Step 1: Create Bitbucket account and login.

Step 2: Go to terminal and perform below-

            git config –global user.email “you@example.com”

            git config –global user.name “Your Name” 

Step 3: Go to folder on the terminal where you need to download the project in the PC(like: home/desktop/abcd). Submit clone command of your shared project(like mentioned below) and project will be downloaded.

            git clone https://abcd@bitbucket.org/md1234/DemoProjectAutomation.git

Step 4: Now import downloaded project in the eclipse

Push Code On Bitbucket-

Step 5: Go to new created folder on the terminal like- home/desktop/abcd/DemoProjectAutomation.

Step 6: Enter below code to see the current branch you are in-

            git branch 

Step 7: If you are in master branch then create a new branch with below code-

            git checkout -b yourbranchname

Step 8: To see the latest code files(files in which new code is entered), enter below code-

            git status

Step 9: To add the latest code to the current branch, enter below code-

           git add

Step 10: Now commit the code on the Bitbucket

           git commit -m “Put Your Message Here”

Step 11: Now push the code to the current branch on Bitbucket

             git push origin yourbranchname

Step 12: Now go to the Bitbucket and create the pull request, now its up to the admin to approve and merge the request

Related content

That’s all for this blog

Go to Top