1

after pulling from github some unwanted lines are being added in many file those are not actually written. Indeed,those are not part of the code.

I am doing pull by this command =>

git pull https://github.com/project/abcproject.git master

lines are being added like this =>

     <<<<<<< HEAD
     =======
     >>>>>>> 8dcbf52aea6c16a5743dae0b5840c2888102dee0
Sudip Das
  • 1,178
  • 1
  • 9
  • 24

1 Answers1

3

Seems that you have conflicts when pulling. This happens because you and other person have modified the same files, and Git is not smart enough to determine what to do.

You need to resolve the conflicts; this link can help.

One practice you can adopt to diagnose this kind of things early, is to perform a git fetch before pulling.

Community
  • 1
  • 1
mekoda
  • 313
  • 2
  • 13
  • By the way, the problem is not that git is not smart enough, but that it simply is not possible in the general case to pick a solution in a merge conflict without having all the back story of the conflicting changes. It's easy to make it impossible even for the most intelligent human if you hold back some information (for example about the domain). – AnoE Jul 26 '16 at 21:02