You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Gitea `1.13`, support for [agit](https://git-repo.info/en/2020/03/agit-flow-and-git-repo/) was added.
19
+
20
+
## Creating PRs with Agit
21
+
22
+
Agit allows to create PRs while pushing code to the remote repo. \
23
+
This can be done by pushing to the branch followed by a specific refspec (a location identifier known to git). \
24
+
The following example illustrates this:
25
+
26
+
```shell
27
+
git push origin HEAD:refs/for/master
28
+
```
29
+
30
+
The command has the following structure:
31
+
32
+
-`HEAD`: The target branch
33
+
-`refs/<for|draft|for-review>/<branch>`: The target PR type
34
+
-`for`: Create a normal PR with `<branch>` as the target branch
35
+
-`draft`/ `for-review`: Currently ignored silently
36
+
-`<branch>/<session>`: The target branch to open the PR
37
+
-`-o <topic|title|description>`: Options for the PR
38
+
-`title`: The PR title
39
+
-`topic`: The branch name the PR should be opened for
40
+
-`description`: The PR description
41
+
-`force-push`: confirm force update the target branch
42
+
43
+
Here's another advanced example for creating a new PR targeting `master` with `topic`, `title`, and `description`:
44
+
45
+
```shell
46
+
git push origin HEAD:refs/for/master -o topic="Topic of my PR" -o title="Title of the PR" -o description="# The PR Description\nThis can be **any** markdown content.\n- [x] Ok"
0 commit comments