How to change LICENSE for a repository? #23555
-
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! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
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! |
Beta Was this translation helpful? Give feedback.
-
AndreaGriffiths11:
Awesome, that’s all great to know. Thank you so much for your quick and concise reply! 😄 |
Beta Was this translation helpful? Give feedback.
-
I never selected a license. But, I now wish to add it or select it from the list of choices. How do I get that option back? Adding a LICENSE.md file didn’t work for me. |
Beta Was this translation helpful? Give feedback.
-
@kunalrshah: Try removing |
Beta Was this translation helpful? Give feedback.
-
If you want to change the license of an existing GitHub repository, you can follow these steps:
Remember to communicate the license change to contributors and users of your repository. Changing a license is a significant action, and it's essential to ensure that everyone is aware of and agrees with the change. Profile
|
Beta Was this translation helpful? Give feedback.
-
thanks 4 the article |
Beta Was this translation helpful? Give feedback.
-
Hey! For sure, the previous answers are also a way to got it! |
Beta Was this translation helpful? Give feedback.
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!