Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Okay, lets visualize. That is your history before you do any merging:</p> <pre><code> O A / O - O - O master \ O - O B </code></pre> <p>Then, you merge <code>master</code> into <code>A</code> and merge that back into <code>master</code>:</p> <pre><code> O - O A, master / / O - O - O \ O - O B </code></pre> <p>Then, you do the same with <code>B</code>. Merge <code>master</code> into <code>B</code>:</p> <pre><code> O - O A, master / / \ O - O - O \ \ \ O - O - O B </code></pre> <p>And then merge it back into <code>master</code>:</p> <pre><code> O - O A / / \ O - O - O \ \ \ O - O - O B, master </code></pre> <p>As you can see, doing that creates quite a mess. However, to get <code>A</code> into sync with <code>master</code> here, just merge it. It will be a fast-forward and look like that afterwards:</p> <pre><code> O - O / / \ O - O - O \ \ \ O - O - O A, B, master </code></pre> <p>OR</p> <p>The better way to do what you want: Just merge everything into master directly. You dont need to merge <code>master</code> into another branch if you just merge it back again. Even with merge conflicts, as you can't push a merge conflict, nobody will notice that you are working in branch master until you finished doing that and pushed it. Merging into master directly will produce the following result (which is the same as yours, but <code>A</code> and <code>B</code> are pointing somewhere else):</p> <pre><code> O A / \ O - O - O - O - O master \ / O - O B </code></pre> <p>However, that leaves you not having <code>A</code> and <code>B</code> merged. They still point at an old commit. So, fast-forward merge them into master. That will make your history look like that:</p> <pre><code> O / \ O - O - O - O - O A, B, master \ / O - O </code></pre> <p>When you now commit something in <code>A</code> and <code>B</code> again, they will differ and make the history look like that:</p> <pre><code> O O A / \ / O - O - O - O - O master \ / \ O - O O B </code></pre> <p>And that is exactly what you wanted right?</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