> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/tools/git/view-the-pr-for-the-current-github-branch.md).

# View The PR For The Current GitHub Branch

As you're working on a feature branch, you may push up an early PR to get your work-in-progress out in public. You can then continue to work locally and push up changes.

If at any point in this process you want to view the PR, you can open a browser tab, visit GitHub, and navigate a few pages to the specific PR. There is a faster using GitHub's CLI -- [`gh`](https://cli.github.com/).

You can view the main details of the PR for the current branch right in your terminal with:

```bash
$ gh pr view
```

You can also open up the PR for the current branch in your browser by adding in the `--web` flag.

```bash
$ gh pr view --web
```

See `gh pr --help` for more details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://ploegert.gitbook.io/til/tools/git/view-the-pr-for-the-current-github-branch.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.
