/
merge-conflicts

merge-conflicts

Easily simulated as follows

  1. Create a local repo

    1. add a text file with some content to the local repo

  2. Commit the changes on the local repo

  3. Create remote repo

    1. add a text file with something unique in it

  4. Attach the remote repo to the local repo using git remote add <remote url>

  5. Run the command git push origin master - a merge conflict message will appear

    1. run the command git pull origin master - git will open the default editor and ask you to enter a message explaining how the merge conflict was resolved - enter a message and save the file

    2. run the command git push origin master

  6. Local and Remote should now be synced

 

Related content