← All topics

GIT & VERSION CONTROL · REFERENCE

Reviews and Collaboration

Share a proposed change, discuss it, and integrate it. Git commands and host collaboration features play different roles.

At a glance

Term or command What it means When to use it
Pull request A hosting-platform proposal to integrate branch changes. Used by GitHub, Bitbucket, and other hosts for review.
Merge request GitLab’s name for a proposed branch integration. Similar purpose to a pull request.
Base / target branch The branch that should receive a proposed change. Check this before opening the request.
Review Feedback on a diff and its effect. Check correctness, clarity, tests, and the intended result.
Fork A host-level copy associated with another repository. Useful when you cannot push a branch to the original project.
Clone A local copy of a repository. Work on the files on your own computer.
Issue A host’s discussion or tracking record. Describe a bug or request; it is not a commit.

Commands are examples, not an interactive terminal. Run them in your own learning repository after checking the prerequisites. Output, paths, commit IDs, and wording can vary. Host-specific instructions are labeled.

The general collaboration cycle

Start from current main
        ↓
Create a focused branch
        ↓
Edit → review → commit
        ↓
Push the branch
        ↓
Open a pull request / merge request
        ↓
Discuss, revise, and check
        ↓
Merge → update your local main

Review requests are features of the hosting platform, not required for a local Git merge. Hosts may enforce approvals or automated checks. Follow the repository’s contribution instructions.

GitHub example: propose your change

Prerequisites: you can push branches to the remote, and update-heading contains your committed change. Run inside the local repository.

git push -u origin update-heading

On GitHub, open the repository and create a pull request. Select update-heading as the source and main as the base. Explain the change, why it helps, and how you checked it. Read the full diff before submitting. On GitLab, create a merge request with the equivalent source and target choices.

Respond to feedback

Make the requested edit locally on the same feature branch, review it, commit, and push again. The existing request normally updates to include those commits. Avoid opening a fresh request for each revision.

git add index.html
git commit -m "Clarify heading after review"
git push

After the host merges

After the request is merged, return to a clean main branch and update it. This brings the host’s integrated result back to your computer.

git switch main
git pull --ff-only

Your team might use merge commits, squash merges, or rebasing. Those choices affect the resulting history. If a fast-forward pull refuses, inspect the divergence instead of force-pushing.

When you cannot push to the original repository

A fork gives you a host-side copy where you can push. Clone your fork, make a branch, then open a request from your fork toward the original. Origin often points to your fork; a second remote conventionally named upstream can point to the original. These are nicknames, not special server types.

A fork copies Git repository history but does not grant write access to the original. A clone makes a local copy; it is not the same operation as a host-side fork.

Sources and further reading

Study questions

Explain it in your own words, then open the answer.

Is a pull request a built-in Git command?

No. It is a hosting-platform collaboration feature.

Does a fork give me permission to edit the original?

No. You work in your fork and propose changes to the original.

Which branch receives the proposed change?

The base or target branch.

How do I update a request after feedback?

Commit and push further changes on its existing source branch.

Why pull after a hosted merge?

The remote has an integrated version your local main may not yet contain.