I am new to Git. I opened Github account, created a public repository, and set up the username and email, as indicated by Github's tutorial. So if anyone knows my username and email, can they commit or push the files in my public repository?. How can I protect the files?. SVN having username password for commit the files. How can I do that?
No, somebody can only commit to your repository if you do one of several things:
But, for any public repository anybody can view the files in the web interface or clone the repository. Also, any GitHub account can fork the repository and send pull requests.
The setup that you do is for github to identify your commits as, well, being yours. But for the commits to be actually pushed to your repository, the person will need access to either your github password or access to your ssh private key.
Without those, no one can push to your repository.
This also means that, anyone can commit using your email and username and push to the repos they have access to. You can do the same too.
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