diff --git a/docs/usage/issues-prs/agit.md b/docs/usage/issues-prs/agit.md index 872a98d1..1fc23c0f 100644 --- a/docs/usage/issues-prs/agit.md +++ b/docs/usage/issues-prs/agit.md @@ -19,30 +19,33 @@ Git version 2.29 or higher is required on the server side for this to work. ## Creating PRs with AGit AGit allows to create PRs while pushing code to the remote repo. -This can be done by pushing to the branch followed by a specific refspec (a location identifier known to git). +This can be done by pushing to a special refspec (a location identifier known to git) instead of to a branch. The following example illustrates this: ```shell -git push origin HEAD:refs/for/main +git push origin HEAD:refs/for/main -o topic="topic_of_my_PR" ``` The command has the following structure: -- `HEAD`: The target branch -- `origin`: The target repository (not a fork!) -- `HEAD`: The local branch containing the changes you are proposing -- `refs//`: The target PR type and configuration - - `for`: Create a normal PR with `` as the target branch - - `draft`/`for-review`: Currently ignored silently - - `/`: The branch you want your changes to be merged into -- `-o `: Options for the PR - - `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. +```shell +git push :refs/for/[/] [-o