mirror of
https://gitea.com/gitea/tea.git
synced 2026-04-25 17:53:37 +02:00
feat(branches): add rename subcommand (#939)
Implements the 'branches rename' command to rename a branch in a repository.
This wraps the Gitea API endpoint PATCH /repos/{owner}/{repo}/branches/{branch}.
Usage: tea branches rename <old_branch_name> <new_branch_name>
Example: tea branches rename -r owner/repo main factory
This resolves issue #938.
Reviewed-on: https://gitea.com/gitea/tea/pulls/939
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
Co-committed-by: Matěj Cepl <mcepl@cepl.eu>
This commit is contained in:
20
docs/CLI.md
20
docs/CLI.md
@@ -1381,6 +1381,26 @@ Unprotect branches
|
||||
|
||||
**--repo, -r**="": Override local repository path or gitea repository slug to interact with. Optional
|
||||
|
||||
### rename, rn
|
||||
|
||||
Rename a branch
|
||||
|
||||
**--fields, -f**="": Comma-separated list of fields to print. Available values:
|
||||
name,protected,user-can-merge,user-can-push,protection
|
||||
(default: "name,protected,user-can-merge,user-can-push")
|
||||
|
||||
**--limit, --lm**="": specify limit of items per page (default: 30)
|
||||
|
||||
**--login, -l**="": Use a different Gitea Login. Optional
|
||||
|
||||
**--output, -o**="": Output format. (simple, table, csv, tsv, yaml, json)
|
||||
|
||||
**--page, -p**="": specify page (default: 1)
|
||||
|
||||
**--remote, -R**="": Discover Gitea login from remote. Optional
|
||||
|
||||
**--repo, -r**="": Override local repository path or gitea repository slug to interact with. Optional
|
||||
|
||||
## actions, action
|
||||
|
||||
Manage repository actions
|
||||
|
||||
Reference in New Issue
Block a user