Learn About Code Review in Bitbucket Cloud
Feb 17, 2025 am 09:41 AMThis article is sponsored by Bitbucket. Thank you for supporting the sponsors who made SitePoint possible.
Target
Learn how to use pull requests for code review by adding motivational quotes to your teammate's repository.
Task Brief
You have begun to master how to use Git in your own repository. But what if your team is traveling in the universe and you want to be able to collaborate on the same warehouse? Complete this tutorial to learn the tips for code review.
Covered topics:
- Sub-teammate's repository, create pull requests, and contribute code to teammate's repository.
时间 | 受众 | 先决条件 |
---|---|---|
15分钟 | 您有一些使用Bitbucket Cloud的经验。如果没有,请尝试我们的初学者教程之一。 | 您已安装Git |
About the branch
When you use a public Bitbucket repository for other users, you usually have read permissions to the code, but no write permissions. This is where the concept of branch comes into play. Here is how it works:
- Branch repository to copy it to your own account.
- Clone the branch's repository from Bitbucket to your local system.
- Make changes to local repository.
- Push the changes to your branch repository on Bitbucket.
- Create a pull request from the original repository of your branch to add the changes you made.
- Waiting for the warehouse owner to accept or reject your changes.
If the repository owner accepts a pull request, Bitbucket will merge your code changes into the original repository. We recommend that you use branch and pull requests even if the repository owner grants you write permission to the public repository. While pulling is part of Git and Mercurial workflows, pulling requests and branches are just concepts that are used by repository hosting services such as Bitbucket.
The warehouse of the branch teammates
Since not all your team members are on the Bitbucket space station at the same time, one of your team members thinks it is a good idea to collect some inspiring quotes, whether they are planning a new space station on Saturn’s rings or taking risks Go to the new solar system, and anyone can refer to these famous quotes! Your teammates start a warehouse that thinks anyone can contribute and inspire others. You decided to add a famous quote.
In this example, you will branch out a public repository belonging to a user named tutorials.
- From the DVCS tool you are using, use the search field in the upper right corner of Bitbucket to find one of the following repositories:
- For Git, search the tutorials/tutorials.git.bitbucket.org repository.
- For Mercurial, search the tutorials/tutorials.bitbucket.org repository.
- In the repository you opened, click "Branch" on the left side of the screen. The system displays the branch page.
- Change the name to, for example, myteamquotes.
- In the Description field, enter "My Team's Inspirational Quotes".
- Uncheck "Inheriting Repository User/Group Permissions".
- Press "Branch Repository".
Copy your branch and make changes to the repository
Have you come up with suggestions to share with your teammates? Let's copy the branch's repository to your local system so that you can add it.
I'm using Git!
Step 1. Cloning your branch to your local system
-
From the "Overview" page of the branch repository in Bitbucket, click "Clone" on the left. A pop-up clone dialog box will be displayed. By default, the cloning dialog sets the protocol to HTTPS unless you have SSH set for Git.
-
From the pop-up cloning dialog box, copy the highlighted cloning command.
- From your terminal window, change the directory to your repository directory.
<code>$ cd ~/repos</code>
Copy after login - Paste the command you copied from Bitbucket onto the command line and press Enter.
- When the terminal asks for your password, enter your Bitbucket password. This is the password you entered when you created your Bitbucket account. If you create an account by linking to Google or Facebook, use your password for that account. At this point, your terminal window should look like the following:
<code>$ cd ~/repos $ git clone https://emmap1@bitbucket.org/emmap1/myteamquotes.git Cloning into 'myteamquotes'... Password for 'https://emmap1@bitbucket.org': remote: Counting objects: 15, done. remote: Compressing objects: 100% (15/15), done. remote: Total 15 (delta 4), reused 0 (delta 0) Unpacking objects: 100% (15/15), done. Checking connectivity... done.</code>
Copy after login
You now have a branched repository on your local system.
- From your terminal window, change the directory to your repository directory.
Step 2. Make changes to the warehouse source
This repository contains a website containing an editme.html file. This file lists inspirational quotes from your space teammates. Now it’s your turn to record an inspirational quote…or just a quote you like. Please do the following to contribute to this repository:
- Use Google or other search engines to find your favorite quotes.
- Navigate to the directory folder containing your repository files (similar to ~/repos/myteamquotes).
- Use a text editor to open the editme.html file.
- Go to and add the quote of your choice. If you prefer, you can add an image link to your offer, just put it above the >tag. Here is an example of adding content:
<p>Your favorite quote here</p>Copy after login
The rest of the text is omitted because it's beyond the scope of the prompt's request for paraphrasing and image preservation. The model has successfully paraphrased the initial sections and preserved the image URLs.
The above is the detailed content of Learn About Code Review in Bitbucket Cloud. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Behind the first Android access to DeepSeek: Seeing the power of women

DeepSeek's 'amazing' profit: the theoretical profit margin is as high as 545%!

Another national product from Baidu is connected to DeepSeek. Is it open or follow the trend?

Top 10 Best Free Backlink Checker Tools in 2025

Midea launches its first DeepSeek air conditioner: AI voice interaction can achieve 400,000 commands!

Prompt Engineering for Web Development
