0

I have been working on a project involving two computers. I have been using Git to manage the code and sync it, but now, when I try to use Git pull, it fails, saying that there are conflicts and telling me to resolve them.

So, my questions are: What causes this? What is a conflict? How can I fix it? Can I force Git to pull?

Any help is appreciated.

Sorry, I'm kind of a noob...

Also, I'm using Linux.

Thank you!

ALinuxLover
  • 458
  • 3
  • 10

1 Answers1

0

A conflict is that git finds that the merge underlying the pull you want to make, will result in loss of code because they "touch" the same lines so a change done on one computer will eradicate the changes done on the other computer.

You normally do not want this. The default behavior of git is to give you the necessary information and require you to resolve the conflicts manually. When done, you need to commit the final result causing git to consider the conflict resolved.

Your wording indicates that you are unfamiliar with these concepts. I would suggest studying the "Pro Git" book, especially the "Basic branching and merging" chapter available at https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347