···1818# Agit Setup
19192020In Gitea `1.13`, support for [agit](https://git-repo.info/en/2020/03/agit-flow-and-git-repo/) was added.
2121+**Note**: git version 2.29 or higher is required on the server side for this to work.
21222223## Creating PRs with Agit
2324···3233The command has the following structure:
33343435- `HEAD`: The target branch
3535-- `refs/<for|draft|for-review>/<branch>`: The target PR type
3636+- `origin`: The target repository (not a fork!)
3737+- `HEAD`: The local branch containing the changes you are proposing
3838+- `refs/<for|draft|for-review>/<branch>`: The target PR type and configuration
3639 - `for`: Create a normal PR with `<branch>` as the target branch
3737- - `draft`/ `for-review`: Currently ignored silently
3838-- `<branch>/<session>`: The target branch to open the PR
4040+ - `draft`/`for-review`: Currently ignored silently
4141+ - `<branch>/`: The branch you want your changes to be merged into
3942- `-o <topic|title|description>`: Options for the PR
4040- - `title`: The PR title
4141- - `topic`: The branch name the PR should be opened for
4242- - `description`: The PR description
4343+ - `topic`: The topic of this change. It will become the name of the branch holding the changes waiting for review. This is REQUIRED to trigger a pull request.
4444+ - `title`: The PR title (optional but recommended), only used for topics not already having an associated PR.
4545+ - `description`: The PR description (optional but recommended), only used for topics not already having an associated PR.
4346 - `force-push`: confirm force update the target branch
44474548Here's another advanced example for creating a new PR targeting `main` with `topic`, `title`, and `description`: