Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to collaborate in a project using Git without using Github?

Tags:

git

github

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?

like image 373
Mr Cold Avatar asked Apr 26 '15 01:04

Mr Cold


People also ask

Can you use Git without GitHub?

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.

Can you collaborate on Git?

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.

How do I give someone access to my Git?

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.


1 Answers

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.

like image 182
jthill Avatar answered Sep 19 '22 15:09

jthill