Use the AGit to push and create pull requests at the same time #7
Labels
No Label
aider
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Jmaa/aider-gitea#7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refer to following reference:
In Gitea 1.13, support for AGit was added. AGit enables users to create pull requests directly, even without write permissions of the repository, eliminating the need to fork it. This helps reduce the number of duplicated repositories and minimizes unnecessary disk usage.
note
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). The following example illustrates this:
git push origin HEAD:refs/for/main
The command has the following structure:
Here's another advanced example for creating a new PR targeting main with topic, title, and description:
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"