corazza
corazza

Reputation: 32344

Can other people commit to my Git repo?

I've created a few free Git repositories for sharing my projects online. But, I use that code locally, so could other people mess with it?

I have created the repositories online, on their Website, then I cloned them to my laptop, and then I copy-pasted all my relevant project's files in there. After that I git add .'ed, git commit -a'ed and git push'ed.

When I say that I plan to use that code locally, I mean that I plan to import the Python module from the repo directory on my laptop.

Upvotes: 1

Views: 1434

Answers (1)

Aayush Kumar
Aayush Kumar

Reputation: 1618

If they have write access to the repository, then can commit code to it. You can then pull in the changes that others have committed. With git you often work in branches, and if you're the owner or the admin, you can choose to merge the code commit with the master branch, or, to entirely dismiss the commit if you think it's not useful.

Also, not all git repositories are visible or accessible to everyone. This depends on the way you have configured it.

Here's a good introductory article that explains access controls in git.

Upvotes: 1

Related Questions