git difftool not recognize current file path

50 views Asked by At

I did git difftool FORMER_BRANCH_NAME HEAD and. expect I could compare files in Araxis merge.

However, the Araxis merge are displaying files in temporary file paths.

/var/folders/ft/d77t_nxd141g373d7p6t47lc0000gn/T/uga8V8_XXXXller.js

I don't expect this for the files with my latest commit. It should be /src/views/a.js

This kind of file path which could let me make the changes back to the file directly.

How could I achieve this? Make the Araxis merge recognizes the real file path and do the compare.

enter image description here

1

There are 1 answers

0
Ry- On

HEAD refers to a commit, not to the working tree, so the files involved in its diff might not be the same as/exist in the working tree, or remain that way.

You can diff against the working tree by specifying only one commit:

git difftool FORMER_BRANCH_NAME