useGit API
    Preparing search index...

    Function renameBranch

    • Rename an existing branch.

      Parameters

      • from: string
      • to: string
      • opts: { force?: boolean } = {}
        • Optionalforce?: boolean

          Force rename a branch.

          false
          

      Returns Promise<string>

      await renameBranch("old-name", "new-name")

      // Force rename a branch
      await renameBranch("old-name", "new-name", { force: true })

      1.0.0