Why does `git diff` not work with process substitution?
git diff does not work with process substitution because a patch that added handling of process substitution was ignored.
git diff does not work with process substitution because a patch that added handling of process substitution was ignored.
The unified diff starts with two line header: — from-file from-file-modification-time +++ to-file to-file-modification-time Anything before this header is ignored, so you can add any comment here, for example: This may be some useful description of this patch that will be ignored by the diff/patch utility. — a/foo 2002-02-21 23:30:39.942229878 -0800 +++ b/foo 2002-02-21 23:30:50.442260588 … Read more
Yes, but it depends a bit on your definition on what the “current project state” is. The manual for git diff goes on. If you are interested in comparing with the staged changes: git diff [–options] –cached [<commit>] [–] [<path>…] This form is to view the changes you staged for the next commit relative to … Read more
You can use –diff-filter option of git diff: git diff –color –name-only –diff-filter=A branch1 branch2
You probably want the “triple-dot” syntax: git diff D…H See also What are the differences between double-dot “..” and triple-dot “…” in Git diff commit ranges?
Is there a way to diff the HEAD of master against the HEAD of Branch A in Github? Sept 2018: yes: GitHub now explicitly supports “Three-dot and two-dot Git diff comparisons”. See an example here. keisuke mentions in the comments a similar initiative on Bitbucket. Original answer 2015: No: as mentioned in “GitHub compare view … Read more
The following settings work fine for me. However, I am using TortoiseGit not TortoiseSVN. Notice the difference in the parameters for diff. [diff] tool = tortoisediff [difftool] prompt = false [merge] tool = tortoisemerge [mergetool] prompt = false keepBackup = false [difftool “tortoisediff”] cmd = \””c:/Program Files/TortoiseGIT/bin/TortoiseGitMerge.exe”\” -mine “$REMOTE” -base “$LOCAL” [mergetool “tortoisemerge”] cmd = … Read more
You can do: git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is the id of the “empty tree” in Git and it’s always available in every repository.
The documentation for git diff says “–staged is a synonym of –-cached“, so yes.
I think there are multiple algorithms supported because none of the algorithms are clearly the best choice in all cases. The differences are in readability of the patch output and processing time needed to generate the patch. Summarizing, this is what I understand the differences are: Myers: The original algorithm as implemented in xdiff (http://www.xmailserver.org/xdiff-lib.html … Read more