Forgejo ships with limited support for [AGit-Flow](https://git-repo.info/en/2020/03/agit-flow-and-git-repo/). It was originally introduced in Gitea `1.13`.
Similarly to [Gerrit](https://www.gerritcodereview.com), it is possible to create Pull Requests to a target repository by pushing directly to that said repository, without having to create feature branches or forks.
Creating a new Pull Request can be done by pushing to the branch that you are targeting followed by a specific [refspec](https://git-scm.com/book/en/v2/Git-Internals-The-Refspec) (a location identifier known to Git).
For clarity, suppose that you cloned a repository and created a new commit on top of the `main` branch. Here is how you would create a Pull Request targeting the `main` branch:
Some caution is required when pushing new changes to an existing Pull Request that was created using AGit. Otherwise, Forgejo may not be able to associate your new changes with your existing Pull Request, resulting in the creation of a new Pull Request.
If you rebase or amend a commit that is already a part of your Pull Request, you **must** push it using the topic that you used before **together** with the `force-push` option.
#### For Gerrit users
Despite the similarites with the Gerrit workflow, AGit does **not** act as a drop-in replacement.
- Submitting new changes will **not** create different "reviews" that can be reviewed individually. Subsequent commits will be appended to the same Pull Request.
- Forgejo does not rely on [Change-Ids](https://gerrit-review.googlesource.com/Documentation/user-changeid.html).