Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does github require each committer to have their own fork of the project?

Tags:

git

github

I'd like to try git (hosted on github) for a new project, but I have a doubt on how it works. I am working with another guy, do we need to have two forks of the project and then merge them every time one of us makes a change to the code or is it possible to work in pair on a single origin?

like image 385
mariosangiorgio Avatar asked Jun 03 '10 13:06

mariosangiorgio


People also ask

How do forks work in GitHub?

A fork is a copy of a repository that you manage. Forks let you make changes to a project without affecting the original repository. You can fetch updates from or submit changes to the original repository with pull requests.

Can I fork my own repository in GitHub?

You can fork any repo by clicking the fork button in the upper right hand corner of a repo page. Click on the Fork button to fork any repo on github.com. Source: GitHub Guides.

How do I fork someone else's repository?

Go to the repository on github. (Say it's by myfriend , and is called the_repo , then you'll find it at https://github.com/myfriend/the_repo .) Click the “Fork” button at the top right. You'll now have your own copy of that repository in your github account.

Is fork and clone same in GitHub?

A fork creates a completely independent copy of Git repository. In contrast to a fork, a Git clone creates a linked copy that will continue to synchronize with the target repository.


2 Answers

It's possible to have as many additional committers (called collaborators in GitHub terms) on a single project as you want. However, the maximum number is dependent on the pricing plan. Note that public repositories can have an unlimited number of collaborators.

As for Git itself: anybody who has write access to a repository can push to it.

like image 102
Jörg W Mittag Avatar answered Oct 05 '22 18:10

Jörg W Mittag


The short answer is no, as long as you're using a public repository. Head to the admin section for the repository, select the "Collaborators" pane, and add as many users as you would like to be able to commit to the repository. All users would then use the same address to clone from and push to.

Just remember to pull their changes before you push your own.

like image 45
Will Robertson Avatar answered Oct 05 '22 19:10

Will Robertson