Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

multiple users and a single repository on github or springloops

Does anyone know of a way to allow multiple users work from the exact same repository on github or springloops?? The way that we've tried this is sharing the same key/pair with all 4 machines being used, but it's not working. one account works fine, but then we are unsure how to really coordinate the entire push/pull/merge aspect. what we wanted to avoid is having multiple branches going on.

the appeal of springloops was that everytime someone make a change, that change would be FTP'd up to the dev server automatically. Then just one person is in charge of moving dev to production.

like image 548
Joe Smack Avatar asked Feb 15 '11 18:02

Joe Smack


People also ask

Can multiple people own a GitHub repository?

Repositories owned by personal accounts have one owner. Ownership permissions can't be shared with another personal account. You can also invite users on GitHub to your repository as collaborators.

How does GitHub work with multiple users?

Contributing to multiple accounts using HTTPS and personal access tokens. Alternatively, if you want to use the HTTPS protocol for both accounts, you can use different personal access tokens for each account by configuring Git to store different credentials for each repository. Open Terminal.

Can a repository have multiple owners?

You can only add collaborators to your repository. It cannot be "co-owned". The only way for doing what you want is to fork the repo and collaborate through pull requests. Note that you can create an organization ( https://github.com/account/organizations/new ) and achieve a bit of what you want.


2 Answers

Git was designed to be used with a repository for each developer. Make an account for each person, then designate one as the maintainer of the master branch. Everyone else will fork the master, and they can work on whatever they want on their own. Once they finish something they will send you a pull request and you can pull their changes into the master branch. Then everyone else can pull from the master as often as they like (once per day, twice per day, etc).
Managing multiple branches may sound difficult, but as long as you communicate effectively it shouldn't be an issue. Once a developer finishes a feature it's important that they send you a pull request and they don't just sit on the commits and nobody knows about them.

A possible good policy for developers to follow before sending a merge request is to have them pull from master and ensure that there are no conflicts.

If you really want to use one account, you don't have to share the same key. Github allows you to upload as many keys as you want. However, if you want something that works like SVN you should use SVN because Git isn't designed to follow the same workflow as SVN.

like image 83
jonescb Avatar answered Sep 21 '22 14:09

jonescb


There are two main workflows. Both assume each developer has set up a github account which is free and sensible:

  1. Add other developers as collaborators to your main repository so they can push their changes to it.
  2. Let other developers fork your repository and issue pull requests to integrate changes

Collaborators are preferable if a group of you are making or maintaining a software product. There is one repository for the project on github and each developer will have a local repository for their development work.

The forking is useful if there are other teams or developers using their own version of your product. It gives them a way (pull requests) to offer their changes back to enhance your product. Each fork is generally considered as a distinct viable variant of your project.

Forking is also be useful in an open source environment while you are 'coming to trust' a potential collaborator. If you find yourself routinely accepting their pull requests, you may 'promote' them to being a collaborator.

Branches are important and very useful. Its hard to do without them on the remote repo if more than one developer needs to work together on an experimental feature or significant extension to your project.

like image 40
Paul Whipp Avatar answered Sep 20 '22 14:09

Paul Whipp