Skip to main content

Copy labels from an existing repository

ยท One min read

I recently learned how to copy labels from one repository to another.

As far as I know it's the easiest way to bring existing Github labels to a new or existing repository. Creating a new repository from a template doesn't seem to include labels at this time.

Install Github CLIโ€‹

Start by installing the Github CLI if you haven't done so already.

Next, you'll have to login with gh auth login.

Clone your labelsโ€‹

Github CLI provides a very convenient label cloning command that lets you copy all of your labels at once:

gh label clone username/source-repo --repo username/destination-repo

The above command will copy all the labels but won't delete existing labels in the destination repository.