Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

Git is extremely flexible, and you can set it up in many different ways. However people have very strong opinions on what are good conventions to adhere to in using git. However it is setup requires some coördination, but certain ways can require more or less. The general term to search for is "git workflow" to find discussions about this.

Note that every git checkout is a repository, so in some trivial sense every developer must indeed have their own repository. It is quite possible to only have one "shared" repository on github, either with multiple keys, or one key. This requires more coördination up front -- you have to agree on where the development is headed. With multiple "public" repositories, you can delay this. People can look at each other's work and discuss whether it should get merged into a blessed repository.

(You can also do this with multiple branches on one repository, and you can also do discussions via sending around patch sets, it's just matter of what's easier.)

The answer is:

chgrp -R <whatever group> gitrepo
chmod -R g+swX gitrepo

(Found: https://serverfault.com/a/27040/138239)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top