The git-log documentation explains the parameter --full-diff
.
In detail:
Without this flag, git log -p ... shows commits that touch the specified paths, and diffs about the same specified paths. With this, the full diff is shown for commits that touch the specified paths; this means that "…" limits only commits, and doesn’t limit diff for those commits.
Note that this affects all diff-based output types, e.g. those produced by
--stat
, etc.
I've no idea what it tries to explain, can someone give me an example maybe.
Comparing changes with git diff Diffing is a function that takes two input data sets and outputs the changes between them. git diff is a multi-use Git command that when executed runs a diff function on Git data sources. These data sources can be commits, branches, files and more.
The git log command shows a list of all the commits made to a repository. You can see the hash of each Git commit , the message associated with each commit, and more metadata. This command is useful for displaying the history of a repository.
Graph all git branchesDevelopers can see all branches in the graph with the –all switch. Also, in most situations, the –decorate switch will provide all the supplemental information in a formatted and nicely color-coded way.
When viewing a combined diff, if the two files you're comparing have a line that's different from what they were merged into, you will see the ++ to represent: one line that was added does not appear in either file1 or file2.
Sure. Let's say you have a commit C that makes changes to file A and file B.
Regular git log -p -- A
will show all commits that touch file A, and for those commits, it'll show the diffs to A. With --full-diff
, it'll show the same commits, but for each commit it'll show the diff of all files changed in that commit. In this case, commit C's diff will show diffs for files A and B.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With