I am trying to do a merge for one file from another repo and I found this slides is working exactly what I want Git merge single file from another repository into my own
And the command I am using is:
git checkout -p other/target-branch target-file.ext
But the issue I met is that I was asked by something like below (probably due to conflict merge?)
--- b/xxxx/test.pl
+++ a/xxxx/test.pl
@@ -46,9 +46,6 @@ push( @INC, $1 );
-$xxxxxxxxxxxxxxxxxxxx;
-
&main;
Apply this hunk to index and worktree [y,n,q,a,d,/,j,J,g,e,?]?
those two test.pl were 99% the same before and as the a/xxxx/test.pl has been updated, I thought I shall do a merge so that my own test.pl keeps all the history of a/xxxx/test.pl.
Problem is that I don't know how to use [y,n,q,a,d..] to handle this conflicted merge, and I know there is a gui tool "git mergetool" which will trigger like kdiff3 to make everything easier, how may I use merge gui with this checkout command?
I am quite new to git. So I am doing everything in the correct way?(using checkout for a merge, I olnly find this checkout way works for me proberbly. Or shall I use some git merge command)?