I can compare two remote files with diff
and ssh
:
diff <(ssh machine1 "sudo cat ${FILE}") <(ssh machine2 "sudo cat ${FILE}")
but if I try with git diff
,
git diff --no-index --color-words <(ssh machine1 "sudo cat ${FILE}") <(ssh machine2 "sudo cat ${FILE}")
I obtain:
error: /dev/fd/14: unsupported file type
fatal: cannot hash /dev/fd/14
How can I, with git diff
, compare two remote files not in a repository ?
== Update ==
This question is not about substituting git diff
by diff
and colordiff
, but about using git diff --no-index
through ssh
.