I am new in git and I have some doubts: Which is the difference from initializing a repository as personal or as central?
I guess If I establish as central, all members of my team can access it. However, if I initialize as personal, I am the only I can access to it (other members of my team cannot access it). Am I right?
Could someone confirm me if i am right and what is the difference between personal and central repositories in git? and for central repository, what does bare mean?
The non-bare repository is the one developers use - it has a working copy checked out, i.e. the code is directly available.
In case of a bare repository all that's there is the contents of the .git
folder. This is great for pushing/pulling to/from the repository but for obvious reasons not suitable to view the code directly or work on the code.
So, when you want to develop stuff you want a non-bare repository. When you want to push to another machine create a bare one there and push to it from your non-bare one. If you use e.g. GitHub you won't create that bare repository manually - you create it on the website (which usually creates a bare one internally and sets up access control) and then setup it as a remote locally (the address of the repository is displayed so you just need to copy&paste it).
I consider the two states to be public and private.
Private.
Private is only for me. It's useful to have my code in the cloud, it's backed up and I can download it to any machine I use.
Public. Public is for sharing with other people ('collaborators') whose keys you've entered in the project.
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