Lurker News

Comments (76) 37 threads

Show all comments

Showing thread 12 of 37

linkmotif2 replies#
Not to be that guy but: git log -p $file. Works great IMO.
pault1 reply#
Just the other day I had a coworker freak out when he saw me do this. It baffles me how a professional developer could use git for years and never read the manual.
linkmotif#
yep. Or even just some blog posts or whatever. Git is the worst-presented tool I think, it’s a shame.
u801e1 reply#
That will show you the diffs, but if you want to see the files side by side, you could do something like:

  diff -y <(first_sha1:path/to/file) <(second_sha1:path/to/file)
u801e#
The command should actually read:

  diff -y <(git show first_sha1:path/to/file) <(git show second_sha1:path/to/file)