2

Problem is, i have a file on server branch release who has some conflict (<<<<<<<<<<<<<< ...... ) present on file on my server (repo local) but not on git ( repo distant ). And i don't want to modify it directly on server. I want he take the file on github and put it on the server without conflict and properly.

I try : 1/ git checkout src/Controller/FileName.php ( but it take the file with the merge conflict comment )

And others reset, merge, .... but i don't find the good way to resolve my problem.

I just want he take the file on github ( repo distant ) and put it on server ( without the merge conflict )

Someone have an idea to resolve it ?

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 30 '22 at 16:50
  • It sounds like you want to check a particular file out of a particular commit, using either `git checkout` or `git restore`. See [How to retrieve a single file from a specific revision in Git?](https://stackoverflow.com/q/610208/1256452) – torek Dec 31 '22 at 02:40

1 Answers1

0

No checkout should be required: simply switch to your release branch and edit the file with the conflict markers (<<<< ==== >>>>)

Once you have remove them, leaving only the sections you need, add, commit and push.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250