From 8ed2fc913cafe804819d4bd8a421ebd0a7e0e8ef Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 17 Feb 2026 18:11:57 -0700 Subject: [PATCH] Clarify --clobber flag deletes assets before re-uploading Update the help text and flag description for `gh release upload --clobber` to make it clear that existing assets are deleted before new ones are uploaded, and that original assets will be lost if the upload fails. Fixes #8822 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkg/cmd/release/upload/upload.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/release/upload/upload.go b/pkg/cmd/release/upload/upload.go index 42419ccf3..827dcdc64 100644 --- a/pkg/cmd/release/upload/upload.go +++ b/pkg/cmd/release/upload/upload.go @@ -43,6 +43,9 @@ func NewCmdUpload(f *cmdutil.Factory, runF func(*UploadOptions) error) *cobra.Co To define a display label for an asset, append text starting with %[1]s#%[1]s after the file name. + + When using %[1]s--clobber%[1]s, existing assets are deleted before new assets are uploaded. + If the upload fails, the original assets will be lost. `, "`"), Args: cobra.MinimumNArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -66,7 +69,7 @@ func NewCmdUpload(f *cmdutil.Factory, runF func(*UploadOptions) error) *cobra.Co }, } - cmd.Flags().BoolVar(&opts.OverwriteExisting, "clobber", false, "Overwrite existing assets of the same name") + cmd.Flags().BoolVar(&opts.OverwriteExisting, "clobber", false, "Delete and re-upload existing assets of the same name") return cmd }