0
0
mirror of https://gitea.com/gitea/docs.git synced 2025-06-15 23:23:25 +00:00

Add force-push usage for agit workflow (#78)

```
git push origin HEAD:refs/for/main -o force-push=true -o topic="agit-workflow-usage" -o title="Add force-push usage for agit workflow"
```

Co-authored-by: Elisei Roca <eroca@suse.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/78
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: eliroca <eliroca@noreply.gitea.com>
Co-committed-by: eliroca <eliroca@noreply.gitea.com>
This commit is contained in:
eliroca
2024-10-10 21:31:09 +00:00
committed by Lunny Xiao
parent 610e9d0e1c
commit 19dc1eccd2

@ -38,10 +38,11 @@ The command has the following structure:
- `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.
- `title`: The PR title (optional but recommended), only used for topics not already having an associated PR.
- `description`: The PR description (optional but recommended), only used for topics not already having an associated PR.
- `force-push`: confirm force update the target branch
- `force-push=true`: Specifies whether to force-update the target branch.
- Note: omitting the value and using just `-o force-push` will not work.
Here's another advanced example for creating a new PR targeting `main` with `topic`, `title`, and `description`:
```shell
git push origin HEAD:refs/for/main -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"
git push origin HEAD:refs/for/main -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"
```