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

# Managing branches and pull requests in Base Code

> Track your work in Base Code, create and organize branches, open pull requests, resolve conflicts, answer review comments, and see what your team merged lately.

Work on each change in its own branch, with its own development environment, so your changes stay separate until they're ready. When a change is ready, open a pull request to get it reviewed and merged on GitHub.

***

## Creating branches

Start each new change on its own branch, from your default branch or from another branch you're working on. Base Code names the branch for you. You can start a branch in 2 places:

* **The start screen:** Select the starting branch next to **Create new branch from**, then click **Create branch**, as in [making your first change](https://docs.base44.com/base-code/getting-started.md#making-your-first-change).
* **The editor:** Click **New branch** in the sidebar, then select the starting branch next to **Create new branch** and click **Create**, as shown below. Use it when you're already working on a branch.

**To create a branch from the sidebar:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Click **New branch** in the sidebar to open the editor.
3. Select the starting branch from the drop-down next to **Create new branch**.
4. Describe your change in the AI chat, then click **Create**.

![The Base Code editor with the starting-branch drop-down outlined next to Create new branch](https://mintcdn.com/base44/P5G-k6yhz4jlye0S/images/base-code-sidebar-new-branch.png?fit=max\&auto=format\&n=P5G-k6yhz4jlye0S\&q=85\&s=5d71d93f47e45ac9dae9928e5e3378ef)

Starting a branch from the sidebar

***

## Working from the sidebar

See where each of your branches stands and go straight to the one that needs you. **Your branches** in the sidebar lists the branches you created, and merged branches move to **Merged** at the bottom so you can still read their chats.

Each branch has a status icon. Hover over it to see its label, with the pull request number when there is one.

| What the icon shows | When you see it |
| - | - |
| Needs you | **Conflicts**, **Failed checks**, or **Changes requested** |
| On hold | **CI running**, **Review pending**, or **Queued**, which means your pull request is waiting in your repository's merge queue on GitHub |
| Nothing blocking | **Open** or **Approved** |
| Done | **Merged** |
| Not in review yet | **Draft**, when you haven't opened a pull request for this branch or the one you opened is still a draft on GitHub |

While the AI is building, you see **Working** in place of the icon, or **Merging** while a merge runs. A dot on the right of a branch means the AI finished there and you haven't opened it since.

**To open a branch:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Click the branch under **Your branches**.

***

## Opening a pull request

After testing your changes, open a pull request so your team can review them on GitHub. Your pull request targets the branch your working branch was created from, and the AI chat writes its title and description from your conversation and committed changes.

> [!WARNING]
>
> Your GitHub account needs to be connected and have write access to the repository, because Base Code opens pull requests from your own account.

**To open a pull request from the editor:**

1. Open your branch in Base Code.

2. Click **Create PR** in the editor.

3. Click each changed file in **Create pull request** to check its diff.

   > [!NOTE]
   >
   > **Create pull request** shows only changes that are committed and pushed. To leave a file out of the pull request, [revert the file](https://docs.base44.com/base-code/making-changes.md#reverting-a-file) before you continue.

   ![Create pull request with a changed file's diff open and Revert file below it](https://mintcdn.com/base44/wxd4qAPiNH9vZ8LZ/images/base-code-create-pr-review.png?fit=max\&auto=format\&n=wxd4qAPiNH9vZ8LZ\&q=85\&s=1d0eb087a8adfc8dce46dbf1eb16c132)

   Checking a file's diff

4. Click **Continue in builder**.

5. Review and send the prefilled message in the AI chat.

> [!NOTE]
>
> **After you open your pull request:**
>
> * **New changes:** Changes on your working branch are added to the pull request, and GitHub runs your repository's configured checks.
> * **Merging:** Merge it on GitHub, or ask the AI chat to merge it for you. The AI chat makes a regular merge commit, and your repository's rules, such as required reviews and checks, still apply. However you merge, your branch is read-only afterwards.
> * **Commit authors:** Each commit from the AI chat lists you as the author and `base44-builder[bot]` as co-author.
> * **Approval link:** If the AI chat shares an approval link, approve it if you own the GitHub account or organization that owns the repository, or ask an owner to. Then ask the AI chat to try again.
> * **Changes saved to a new branch:** If your pull request is merged or its branch is deleted while the AI is working, Base Code saves the AI's later changes to a new branch, and the AI chat shares its name. Open a pull request from that branch on GitHub to keep them.

***

## Resolving branch conflicts

If your pull request has conflicts, the AI chat can resolve them for you. Resolving conflicts merges the pull request's base branch into your working branch.

**To resolve conflicts:**

1. Open your branch in Base Code.
2. Click **Resolve conflicts** above the prompt box.
3. Review and test the changes the AI makes, especially where both branches changed the same feature.

***

## Answering review comments

Ask the AI chat to address the unresolved review threads on your pull request. It replies to each thread with what it changed. After pushing its changes, it resolves the threads it fixed.

Threads the AI doesn't change, or that need your decision, stay open with a reply explaining why, and the AI chat tells you which ones.

**To answer review comments:**

1. Open your branch in Base Code.

2. Ask the AI chat to fix the comments on your pull request. For example:

   ```text theme={null}
   Fix the review comments on this pull request.
   ```

3. Review the changes and replies the AI chat reports.

> [!TIP]
>
> To check replies before they're posted, ask the AI chat to draft them. It posts them only when you tell it to.

***

## Tracking your work

See where each of your tasks stands, from the changes Base Code is still making to the pull requests that are merged.

**Your work** on the Base Code start screen sorts your tasks into columns:

* **Base Code is working:** The AI is still making changes.
* **Needs you:** Base Code has a question, or the pull request has conflicts, failed checks, or requested changes.
* **Ready for review:** The work is finished and nothing is blocking it.
* **Done:** Merged, answered, and archived tasks.

**To track your work:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Under **Your work**, choose what you want to do:
   * **Open a task:** Click it to open its branch.
   * **Take the next step:** Click the action on a task, such as **Fix conflicts** or **Merge**.
   * **Find a task:** Search by its title in **Search your work**.
   * **Filter your tasks:** Use the filters for type, status, and time. For example, filter by **Has a question** or **Failed checks**.
   * **Sort your tasks:** Select **Last updated** or **Date created**.
   * **See every pull request:** Click **See all pull requests** to open your repository's pull requests on GitHub.

***

## Viewing team activity

Catch up on what's changed in your project by seeing the pull requests your team merged to main recently, with who merged each one and its pull request number.

**To view team activity:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Click **Activity** in the sidebar.

***

## Working together

Your team can work on the same project and review each other's changes through pull requests. Who can join depends on your project's setting and on whether they're in your workspace:

* **Workspace members:** Base Code projects let [workspace members](https://docs.base44.com/Setting-up-your-app/Managing-access.md#choosing-who-can-collaborate) collaborate by default, so anyone in your workspace can open the project and join without an invite.
* **Workspace guests:** Guests need an invite.
* **People outside your workspace:** [Add them as collaborators](https://docs.base44.com/Setting-up-your-app/Managing-access.md#working-with-collaborators).

To make changes, each teammate also needs their own GitHub account connected, with write access to the repository.

***

## Organizing your branches

Keep the branches you're focused on within reach and bring the ones that need you to the top. You can pin branches, put them in your own groups, and choose how the rest are grouped and sorted.

![The Base Code sidebar with a pinned branch at the top of Your branches and an automatic Open PR group below it](https://mintcdn.com/base44/Los6Grrnm9gT0VmU/images/base-code-sidebar-pinned-and-group.png?fit=max\&auto=format\&n=Los6Grrnm9gT0VmU\&q=85\&s=1761c8763a3511e21065a5bfc91c51f7)

Pinned and grouped branches

### Pinning a branch

Pin a branch to keep it at the top of **Your branches**, above your groups.

**To pin or unpin a branch:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Hover over the branch in the sidebar, then click its options icon .
3. Click **Pin**, or **Unpin** to unpin it.

### Grouping branches

Put related branches together in groups you name yourself.

**To create a group:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Click the **New group** icon next to **Your branches**.
3. Enter a **Group name**, then click **Create group**.
4. Drag a branch onto the group, or click the branch's options icon , click **Move to group**, then select the group.

**To manage your groups:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Choose what you want to do:
   * **Take a branch out of a group:** Drag it onto **Your branches**, or click its options icon , click **Move to group**, then click **Ungrouped**.
   * **Rename or delete a group:** Click the group's options icon , then click **Rename group** or **Delete group**. When you delete a group, you can [archive](#archiving-a-branch) its branches along with it.
   * **Reorder your groups:** Drag a group up or down the list.

### Sorting branches

Base Code groups and sorts the branches that aren't pinned or in your own groups, and you can change how it does this to find a branch faster. By default, it groups them by **Status** and sorts them by **Date created**, with the newest branch at the top of each group.

**To group and sort branches:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Click the **Sort branches** icon next to **Your branches**.
3. Choose how to group them under **Group by**:
   * **Status:** Branches that need you first, then open pull requests and drafts.
   * **Last activity:** By when each branch last changed.
   * **None:** One list, with merged branches still at the bottom.
4. Choose how to sort them under **Sort by**:
   * **Date created:** Newest branch first.
   * **Name:** In alphabetical order by branch name.

***

## Archiving a branch

Archive the branches you're not working on to keep your list short. An archived branch moves to **Archived** at the bottom of **Your branches**, out of its pin or group. Archiving only changes your own sidebar, and the branch, its chat, and its GitHub branch stay as they are.

**To archive a branch:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Hover over the branch in the sidebar, then click its options icon .
3. Click **Archive**.

> [!TIP]
>
> **Bringing a branch back:** Open the archived group, click the branch's options icon , then click **Unarchive**. The branch returns to your list, without its old pin or group.

***

## Removing a branch

Clear out branches you're done with. To keep a branch without it crowding your list, [archive it](#archiving-a-branch) instead.

> [!CAUTION]
>
> Deleting a branch that isn't merged and that no one else is on removes the branch and its chat from Base Code for good. The branch and its commits stay on GitHub.

**To remove a branch:**

1. Go to [Base Code](https://app.base44.com/base-code).
2. Hover over the branch in the sidebar, then click its options icon .
3. Click **Remove branch**.
4. Click the button that shows for your branch:
   * **Remove:** Shown for a merged branch, or for a branch your teammates are also on. The branch leaves your list, and nothing is deleted. Your teammates keep it and its chat, and you can bring back a branch that isn't merged by sending a prompt on it again.
   * **Delete branch:** Shown for a branch that isn't merged and that no one else is on. Deletes the branch and its chat from Base Code.


## Related topics

- [Making changes in Base Code](https://docs.base44.com/base-code/making-changes.md)
- [Getting started with Base Code](https://docs.base44.com/base-code/getting-started.md)
- [Team insights in Base Code](https://docs.base44.com/base-code/insights.md)
- [Working with branches](https://docs.base44.com/Building-your-app/working-with-branches.md)
- [Get branch pull request](https://docs.base44.com/api-reference/get-branch-pull-request.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.