diff --git a/cmd/root.go b/cmd/root.go index a82efb2..413e827 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -16,6 +16,11 @@ var rootCmd = &cobra.Command{ Use: "gh-stack", Short: "Manage stacked pull requests", Long: `gh-stack tracks parent-child relationships between branches, enabling workflows where PRs target other PRs.`, + // SilenceUsage prevents Cobra from printing the help/usage text when a + // command's RunE returns an error. Without this, any runtime error + // (e.g. a rebase conflict) causes the full usage output to be shown, + // which is confusing and unhelpful. + SilenceUsage: true, } // Execute runs the root command.