# Sync the branches in GitHub

I now have three branches which have different status. If I go back to Code and select branches, I can see that **Test** and **dev** are 1 commit ahead of **main**. Hover your mouse above the numbers to clarify this.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/5Ni31W78NbfyJfeKWNjI/image.png" alt=""><figcaption></figcaption></figure>

We sync the branches using **pull requests**. We do this manually and we must accept the changes. If I click on **New pull request**, I see a summary of the changes.

Off screen (it is too big to show!) I see a description of all five files.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/fwgmQ1mwef6notvIP79z/image.png" alt=""><figcaption></figcaption></figure>

I click to **Create pull request**.

I now have the opportunity to approve this request. If this was a multi-programmer project, this sort of workflow would be critical.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/0EGdQ0u1xM94yJbwKXZ5/image.png" alt=""><figcaption></figcaption></figure>

I click to **merge pull request** and then to **confirm**.

I can see this was successful.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/PNoKs1LSx9CP0OyKIpcN/image.png" alt=""><figcaption></figcaption></figure>

And when I go back to check the main branch, my files are there.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/sjUbgdM7fAUYBTLaAW8Y/image.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://johnoraw.gitbook.io/iac-version-control/github/larger-projects/sync-the-branches-in-github.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
