Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In my experience it is most effective to have contributions flow in a single direction from branch to branch and repository to repository. While git can support merging in any direction that usually leads to confusion.</p> <p>Define a clear workflow for changes which are <code>git push</code>ed "upstream" and <code>git pull</code>ed "downstream". For example a developer might: </p> <ol> <li><code>pull</code> from a <code>development</code> branch to get the latest revision.</li> <li>Create a feature branch and commit some changes.</li> <li><code>push</code> those changes upsteam either by merging back into the <code>development</code> branch and pushing that or by pushing their feature branch (or patch) to a pull request, code review process, or other remote integrator.</li> </ol> <p>Similarly work done by developers is pushed upstream to deployment branches, release versions, or other more stable branches of the repository.</p> <p>This can produce a <a href="http://blog.carbonfive.com/2010/11/01/integrating-topic-branches-in-git/" rel="nofollow">clean history of topic branches</a>. Normally I like to make sure each branch's author is responsible for handling the merge. In most cases they are best equipped to resolve any conflicts or they have not yet publicized their branch so they can rebase and rewrite their commits into a fast forward change which does not conflict.</p> <p>Don't be afraid to create more short lived branches. If multiple features in flight need a small change find their common ancestor in the history, branch from there, apply the change, and allow both feature branches to pull it into their work.</p> <p>In some cases merge conflicts are inevitable. If you have two public branches (branches anyone might pull from so you don't want to rewrite history) which conflict then I would pull from the upstream branch, resolve conflicts on the downstream branch, and always push a conflict free merge back upstream. Thus the responsibility for resolving conflicts again falls on the person contributing new conflicting changes to the more authoritative "upstream" branch.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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