0

I cloned some git repository and I have a patch file that I need to apply on one of the files in my working directory but it gives me a conflict.

The patch was prepared by someone else for some testing purposes apparently the needed file was updated on the server but I still need to patch the file locally

What is the best way to do the merge? Does there is a gui for it?(I use Ubuntu)

  • specific error? did you check your repo, is it outdated or up to date? –  Sep 25 '15 at 21:04

2 Answers2

0

I would suggest you to use IDE (Intellij Idea, Eclipse, etc) for applying patch and resolving conflicts (if they occur). Make sure that you have the latest version of remote branch locally before applying patch.

Iana Mykhailenko
  • 553
  • 5
  • 15
  • Could you eloborate?How I use eclipse to apply the patch? –  Sep 25 '15 at 22:05
  • Try right click on the project, go to Team -> Apply patch. You will see a wizard. The third step of the wizard (review patch) contains a Patch Content section where the modified source files are listed. – Iana Mykhailenko Sep 25 '15 at 22:11
0

If you use patch(1) (Unix/Linux) it will tell you what parts of the patch fail, and you can fix up (a copy of) the patch file. Some versions allow you to give fuzz, i. e., allow matches farther than from was originally.

vonbrand
  • 11,412
  • 8
  • 32
  • 52