Any tips on visual diff of files without resorting to VNC?

I use ‘git diff’ to examine changes before committing changes on the server. On my development Mac I have git diff routed through opendiff (FileMerge) which makes reviewing the diffs much faster, especially when looking at SQL dumps with small diffs within lines that can be pages long.

One solution might be setting up X11 & VNC and something like meld to get a visual diff right on the server. But I bet the better approach would be to shoot the files back to my development machine and perform the diff there: no need to set up VNC or burn up bandwidth using it, no latency in the visual diff GUI…

Anyone have scripts already set up to do such a thing, or maybe a better approach altogether? I’d rather not reinvent the wheel, as simple as it may be. Thanks!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thanks for the response. The solution I’ve used with success for the last few months has been to run afpd on the server and mount its git sandbox onto my Mac as an AFP network volume. It’s slow to search, but if I already know the file paths of interest, which I can easily copy-and-paste from a grep in my ssh terminal, then I can use my favorite Mac editor to work on them and use opendiff to get a visual diff. I can recommend this workflow: simple and effective!

Hi @YearOfBenj,

There’re a few different options you have, the easiest, and probably safest, is to use something like either vimdiff, or cdiff, while not as easy as some of the pure graphical options, they would allow you to do this over an SSH session.

An alternative would be to use your SSH session to pipe an X11 session back to your Mac, and then use a remotely executed visual linux tool, but that would likely be a little slow, and probably not as seamless as you’re hoping for.

Hope that helps, and let us know if you have any further questions!