Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Situation A</strong></p> <p>It sounds like you want to set up a <a href="http://www.whygitisbetterthanx.com/#any-workflow" rel="nofollow noreferrer">integration manager workflow</a>. In this scenario, person A creates an initial repository which is the sacred repository. Each person, A, B and C, clones that repository for their personal work. When person B or C has something they want A to include in the repository for sharing, they commit it to their local repository, and ask A to pull from their repository (a <em>pull request</em>); person A sets up <em>remote</em>s for person B's and person C's repositories and then can <code>git pull personB</code> or <code>git pull personB</code> to merge in the changes. Person A then <code>git push</code>s the merged changes into the sacred repository.</p> <p>You can set up the cloning and pushing over a variety of transports. The easiest is to use the git protocol over ssh. e.g.,</p> <ol> <li>Person A makes the sacred repository: see 'Creating a remote repository' at this <a href="https://37s.backpackit.com/pub/1465067" rel="nofollow noreferrer">page from 37signals</a>. Let's say it is in <code>/local/git/project.git</code> on <code>sharedhost</code>. You can leave out the <code>--shared=group</code> since you want it to be an integration repository. (Write access here is protected using Unix file permissions.)</li> <li><p>Person A, B and C, in their home directories, clone that repository.</p> <pre><code>cd ~/src git clone ssh://sharedhost//local/git/project.git cd project # edit files in here. git commit </code></pre></li> <li><p>Person A sets up remotes for B and C's repositories.</p> <pre><code>git remote add personB ssh://sharedhost/~b/src/project git remote add personC ssh://sharedhost/~c/src/project </code></pre></li> <li><p>Now person A can <code>git pull personB</code> to fetch B's changes. When A is happy, he will <code>git push</code> to push the newly merged changes to the shared repo and B and C can <code>git pull</code> to fetch them.</p></li> </ol> <p>If setting up the repositories sounds a bit complex, you may want to pay a provider such as <a href="http://github.com/plans/" rel="nofollow noreferrer">GitHub</a> to handle all the hosting of shared git repositories for you. They also have support where they can help you out with problems. For me, I found that the trickiest part is understanding the flow of commits. Once you get that, things start to make more sense. This <a href="http://gitready.com/beginner/2009/01/21/pushing-and-pulling.html" rel="nofollow noreferrer">discussion at gitready.com</a> might help clarify things for you. There is also a <a href="http://www.gitcasts.com/posts/distributed-workflow" rel="nofollow noreferrer">screencast</a> that covers similar material.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload