Question

I recently had a problem wit git couldn't merge because of HEAD and these files. (Netbeans said)

So I tried doing it with Git Bash and it gave me some errors about .DS_Store. So I removed those files and now when I try to merge, almost all files have the text "both modified" even though they seems to be the exact same.

@@@ -1,10 -1,10 +1,22 @@@
 -<html>

 -<head>

 -  <title>403 Forbidden</title>

 -</head>

 -<body>

 -

 -<p>Directory access is forbidden.</p>

 -

 -</body>

  <<<<<<< HEAD
 +<html>
 +<head>
 +  <title>403 Forbidden</title>
 +</head>
 +<body>
 +
 +<p>Directory access is forbidden.</p>
 +
 +</body>
  =======
++<html>
++<head>
++  <title>403 Forbidden</title>
++</head>
++<body>
++
++<p>Directory access is forbidden.</p>
++
++</body>
  >>>>>>> 4dd01fd4
  </html>

But it seems like it's adding an extra intent?

How can I solve this?

Était-ce utile?

La solution

I assume this is because of different line endings (carriage return(\r)/newline(\n)) in the files. Check if they are consistent.

I think the old file has been saved under Windows(\r\n).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top