Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, after remote repository rejected push as non fast-forward, you need to pull from remote repository (this would do a merge, which means that you might need to resolve merge conflict -- don't forget to commit merge conflict resolution in that case), and then push again.</p> <hr> <ol> <li><p>After comitting changes on machines A and B you have the following situation:</p> <ul> <li><p>''remote repository''<pre> *---*---*---C </pre></p></li> <li><p>''machine A''<pre> *---*---*---C---A </pre></p></li> <li><p>''machine B''<pre> *---*---*---C---B </pre></p></li> </ul></li> <li><p>After pushing from machine A to remote repository you have:</p> <ul> <li><p>''remote repository''<pre> *---*---*---C---A </pre></p></li> <li><p>''machine A''<pre> *---*---*---C---A </pre></p></li> <li><p>''machine B''<pre> *---*---*---C---B </pre> Push from machine B would correctly refuse to "overwrite" commit A with commit B.</p></li> </ul></li> <li><p>After pulling from remote repository on machine B you have:</p> <ul> <li><p>''remote repository''<pre> *---*---*---C </pre></p></li> <li><p>''machine A''<pre> *---*---*---C---A </pre></p></li> <li><p>''machine B''<pre> *---*---*---C---B----M \ / \--A--/ </pre> Just in case this ASCII-art gets mangled: there is form from commit C, and two branches are merged as commit M.</p></li> </ul> <p>Now the push would be fast-forward</p></li> <li><p>After pushing from machine B to remote repository</p> <ul> <li><p>''remote repository''<pre> *---*---*---C---B----M \ / \--A--/ </pre></p></li> <li><p>''machine A''<pre> *---*---*---C---A </pre></p></li> <li><p>''machine B''<pre> *---*---*---C---B----M \ / \--A--/ </pre></p></li> </ul></li> <li><p>Now on machine A you need to pull from repository before starting any new work, to be up to date. Pull would fast-forward, which means that there wouldn't be created any new merge commit. Now all three machines have the same state of repository</p> <ul> <li>''remote repository''<br>''machine A''<br>''machine B''<pre> *---*---*---C---B----M \ / \--A--/ </pre></li> </ul></li> </ol> <p>HTH</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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