I am a beginner to Git and Github and still confused about them. It is said that we can use Git without Github when collaborating with other people. However, it is also said that Git works locally on one's computer. If we do not use Github, how can we collaborate while Git works only locally?
You can use Git without ever using an online host like Github; you would still get the benefits of saved backups and a log of your changes. However, using Github (or the others) allows you store this on a server so that you can access anywhere or share.
Collaboration is the way different people can work on the same project together. It is like creating a group in GitHub just like Groups in other social media. The people added to the collaborator's list can be able to push, merge, and do other kinds of similar things on the project. Step 2: Add files to your project.
On GitHub, click the “Settings” button on the right, select “Collaborators”, click “Add people”, and then enter your partner's username. To accept access to the Owner's repo, the Collaborator needs to go to https://github.com/notifications or check for email notification.
You collaborate by swapping commits around among repositories and cooperating to whatever extent you find convenient on what to name interesting ones. That's it. Really: that's all there is to it.
Github runs a server that speaks most of the main protocols git supports for swapping commits and refnames around, and it has a web GUI on top of a big helping of handy abstractions and features for browser-mediated access, but when it comes right down to it it's all about swapping commits. There's lots and lots of ways to do that, because the underlying structure is (quite literally incredibly) simple. It's so simple people don't believe it.
Your repos are yours; what goes on in them is your business alone. The idea is getting commits into another repository is in some agreed-on (for each repo) sense publishing them. What's in at least some (including your own) repos will include rough-draft commits and random notes, experiments and outright garbage that nobody wants. Nobody cares what's in your personal repos any more than they care what's in the notes on your desk, it's the ones you publish that matters.
Using multiple repos for a single-project workflow is common -- creating a sandbox clone for really experimental work quite literally doesn't take two seconds for even the largest repositories (any subsequent checkout might take some time). You start doing clones to a tmpfs with barely a thought.
And in every repo you have the full power of a world-class vcs available for your own exclusive and personal use.
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