How to change LICENSE for a repository?

I know it is easy to add a license to a GitHub repository for the first time and have done so for all of mine. However, if a repository already has a license, what’s a good way to change it?

Do I simply remove the existing LICENSE file, change any and all SPDX identifiers in files, and GitHub will automatically give me the option to add a LICENSE again?

Also, what’s a good way to propagate the license change to all branches in a repository?

Thanks!

1 Like

Hi @penyuan, thank you for being here! You are correct you can remove the file and then check your community profile, and you’ll see the option to add a license once again.

As far as the branches, we only look at the license on the default branch, and apply that to the whole repository.

I hope this helps!

2 Likes

Awesome, that’s all great to know. Thank you so much for your quick and concise reply! :smile: