The git difftool
command is not, in general, meant for for editing files. See my answer to How difftool can show branch changes but avoiding merges? for more about how git difftool
is designed.
Doing very large merges in Git (or anywhere, really) can be difficult. The usual solution to this problem is to avoid doing large merges. Git's design encourages frequent small commits, which can be merged with frequent small merges, which are generally far easier and less error-prone. But that's something to be addressed in the future; you have a large merge problem now, and you must deal with it.
The way to deal with it is not to use git difftool
. Just don't run git difftool
at all. If you want to have access to all the files from the two branches of interest accessible somewhere, consider using git worktree add
for this purpose instead. (Caveat: make sure you have Git version 2.15 or later, if possible; git worktree
was new in Git 2.5 and has a few nasty surprises in it that were finally fixed in 2.15. For just viewing files, the implementation in Git 2.5 is fine, though.)
To perform a merge, pick some working tree—such as the main one, rather than one added with git worktree add
—and begin the merge. Proceed with it until it is complete. Do not try to use this working tree for any other purpose while you use it for merging.
If you don't have git worktree
, note that you can just make multiple clones of a repository. Use one clone in which to do the merge; use the other clone(s) to view files from particular commits, including the branch tips that you are merging.