# Les conflits de synchronisation

### De quoi on parle ?

On travaille sur des dossiers communs à plusieurs personnes.

<span style="text-decoration: underline;">**Cas n°1 :**</span> Si Bob change le fichier **<span style="color: rgb(185, 106, 217);">sur son ordi,</span>** et qu'Alice a la même idée **en même temps <span style="color: rgb(185, 106, 217);">sur son ordi</span>**

<span style="text-decoration: underline;">**Cas n°2 :**</span> Si Bob change le fichier en ligne **<span style="color: rgb(35, 111, 161);">sur Internet</span>**, et qu'Alice le change **<span style="color: rgb(185, 106, 217);">sur son ordi,</span>** **en même temps**

<span style="text-decoration: underline;">**Cas n°3 :**</span> Si Bob change le fichier en ligne **<span style="color: rgb(35, 111, 161);">sur Internet</span>**, et qu'Alice le change **<span style="color: rgb(185, 106, 217);">sur son ordi,</span>** qui <span style="color: rgb(224, 62, 45);">**n<span style="color: rgb(224, 62, 45);">'était pas connecté</span> à Internet** </span>(et donc n'était synchronisé aux dernières modifications) pui**s synchronise son ordi**

<p class="callout success">C'est là que le conflit arrive.</p>


### Et ça se concrétise comment ?  


Sur le logiciel que vous avez sur votre bureau, le logiciel affiche des icônes de couleurs différents. Voici les explications

<table border="1" id="bkmrk-synchronisation-ok-s" style="border-collapse: collapse; width: 100%; height: 523.6px;"><colgroup><col style="width: 6.72847%;"></col><col style="width: 93.3951%;"></col></colgroup><tbody><tr><td>[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-08/scaled-1680-/mKYimage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-08/mKYimage.png)

</td><td>Synchronisation OK</td></tr><tr style="height: 55.6px;"><td style="height: 55.6px;">[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-08/scaled-1680-/iJYimage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-08/iJYimage.png)

</td><td style="height: 55.6px;">Synchronisation en cours  
</td></tr><tr style="height: 225.8px;"><td style="height: 225.8px;">[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-08/scaled-1680-/G2dimage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-08/G2dimage.png)

</td><td style="height: 225.8px;">Il y a au moins 1 conflit de synchronisation.

Le conflit se matérialise par la génération **en local sur votre PC seulement** d'un doublon du fichier avec la mention `conflicted copy.`

![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-08/scaled-1680-/cczimage.png)

[Comment résoudre un conflit ? C'est juste après ↓](https://librairie.grap.coop/books/nextcloud/page/les-conflits-de-synchronisation#bkmrk-comment-r%C3%A9soudre-un-)

</td></tr><tr style="height: 51.8px;"><td style="height: 51.8px;">[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-08/scaled-1680-/T2Fimage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-08/AwQimage.png)

</td><td style="height: 51.8px;">Indique une erreur de configuration, telle qu'un login ou une URL de serveur incorrects  
</td></tr><tr style="height: 55.0833px;"><td style="height: 55.0833px;">[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-08/scaled-1680-/weEimage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-08/weEimage.png)

</td><td style="height: 55.0833px;"> Vous avez volontairement suspendu les synchronisations  
</td></tr><tr style="height: 54.6px;"><td style="height: 54.6px;">[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-08/scaled-1680-/c54image.png)](https://librairie.grap.coop/uploads/images/gallery/2023-08/c54image.png)

</td><td style="height: 54.6px;">L'assistant de synchronisation a perdu la synchronisation avec le serveur Nextcloud  
</td></tr></tbody></table>


### Comment résoudre un conflit ?

#### Si vous devez mixer un peu des deux fichiers

- Ouvrez les deux versions
- Mixer les deux fichiers
- Sauvegarder votre bon fichier
- Supprimer l'autre
- Assurez vous qu'il n'y ait plus marqué "conflicted copy" dans le nom du fichier restant
- Ça devrait être tout bon !

#### Si vous voulez ne garder qu'un fichier sur les deux  


<table border="1" id="bkmrk-cliquer-sur-l%27ic%C3%B4ne-" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr><td>Cliquer sur l'icône jaune de votre ordi (en haut à droite sur Ubuntu, en bas à droite sur Windows)<span style="background-color: rgb(236, 240, 241); color: rgb(241, 196, 15);">  
</span>

</td><td>[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-08/scaled-1680-/G2dimage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-08/G2dimage.png)

</td></tr><tr><td>Puis le bouton `Resolve conflicts`

</td><td>**[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-11/scaled-1680-/Pcximage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-11/Pcximage.png)**

</td></tr><tr><td>Un panneau apparaît, comparant chaque fichier

À gauche la version "local" (sur l'ordi) et

À droite la version du "serveur" (sur Internet)

**Cocher la case du fichier <span style="text-decoration: underline;">à garder</span>**

</td><td>[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-11/scaled-1680-/ecjimage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-11/ecjimage.png)</td></tr><tr><td>Valider avec le bouton `Resolve conflict`  
</td><td>[![image.png](https://librairie.grap.coop/uploads/images/gallery/2023-11/scaled-1680-/0TWimage.png)](https://librairie.grap.coop/uploads/images/gallery/2023-11/0TWimage.png)

</td></tr></tbody></table>