> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Git essentials

> Learn the Git concepts behind repository work in Replit, including branches, commits, pull requests, and merges, so you can follow a change through review.

You don't need to learn Git commands to contribute with Replit. These concepts help you understand where your changes go and how your team reviews them.

## What is Git?

Git tracks changes to code over time. A **repository** contains the code and its history. [GitHub](https://github.com) and [GitLab](https://gitlab.com) host repositories and provide collaboration tools; they are not Git itself.

Editing your development copy in Replit does not immediately change the shared repository.

Learn more: [About Git on GitHub Docs](https://docs.github.com/en/get-started/using-git/about-git).

## Branches

A branch is a separate line of work. Make your contribution on a branch so your team can review it before it joins the repository's default branch, often called `main`.

For example, the demo's heading change can live on its own branch while the default branch stays unchanged.

Learn more: [About branches on GitHub Docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches).

## Commits

A commit records a set of changes in Git history, with a message describing them. **Pushing** sends your local commits to the remote repository.

In this example, one commit can record the new heading. A later commit can record a revision requested during review.

Learn more: [About commits on GitHub Docs](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits).

## Pull requests

A pull request proposes bringing changes from one branch into another. Your team can inspect the changes, discuss them, and review checks before accepting the contribution. GitLab calls this a **merge request**.

Opening a request does not merge or deploy your changes.

Learn more: [About pull requests on GitHub Docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).

## Merges

Merging incorporates changes into the target branch. If branches contain incompatible changes, a **merge conflict** may need to be resolved first.

Merging and deploying are different actions. Your team may automate a deployment after merging, but that depends on its release setup.

Learn more: [Merging a pull request on GitHub Docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request).

Try this workflow in [Make a contribution](https://docs.replit.com/build/code/first-contribution.md).
