First of all, sorry because I know it might seem a little dumb question, but I´m new in github and I want to know that. If I make a github repository and it is public, I can commit and upload changes, but can any other person do that too? If the answer is yes, is there a way to share a repository with someone, but just for him to see it and download it but not being able to commit or change anything? Thank you.
So, you have a few questions I will answer each to the best of my ability below.
If I make a github repository and it is public, I can commit and upload changes, but can any other person do that too?
No. Anyone can SEE your code, but they cannot change it without your permission. There are permissions to allow others to send PRs, to fork, and to collaborate. You can change these on a public repo.
For example:
Pulls and Reviews
Forking
...is there a way to share a repository with someone, but just for him to see it and download it but not being able to commit or change anything?
Yes. You can either make the repository private (as an organization) and invite someone with read only permissions or keep it public and disable comments, PRs, and forks.
As a general comment be sure to NEVER upload any private info to your repo, even if it is set to private. This includes API keys, passwords, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With