Title: Theory / Important / CS / Softw / VCS / Git / Diff
Tags: fromMath mathToDef FromInstruction computer_to_instruction fromCommand hasNotNewEffectReturnsMeaning some_instruction

Fla: diff
Effect: Compare working tree and staged files
Prefix: git
Chapter: 2

Fla: --staged or --cached
Effect: Compare staged files and last commit
Prefix: git diff
Chapter: 2

Fla: --check
Page: https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project
Prefix: git diff
Chapter: 5
Section: 2
Print: Identifies all whitespace changes

Fla: diff --ours
Effect: show diff between current head and what was in HEAD before trying to merge (i.e. our side)
Page: https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging
Prefix: git
Chapter: 8
Context: in a merge conflict

Fla: diff --theirs
Effect: show diff between current head and what we tired to merge (i.e. their side)
Page: https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging
Prefix: git
Chapter: 8
Context: in a merge conflict

Fla: -b
Effect: Strip whitespace from diff
Page: https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging
Prefix: git diff
Chapter: 8

Variable: diff.external
Meaning: tool to use to display diff
Page: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
Context: git
Section: 1
Chapter: 8

Variable: diff.cmd.textconv
Meaning: a command used to transform to simple text files when the cmd is required by diff=cmd
Page: https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes
Context: .gitattributes
Section: 2
Chapter: 8

Variable: GIT_DIFF_OPTS
Meaning: the --unified option to pass to git diff (as a full flag)
Page: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery
Context: git
Section: 7
Chapter: 10
Kind: environment variable

Variable: GIT_EXTERNAL_DIFF
Meaning: program to use for `git diff`
Page: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery
Context: git
Section: 7
Chapter: 10
Kind: environment variable

Variable: GIT_DIFF_PATH_TOTAL
Meaning: Total number of files in a `git diff` batch
Page: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery
Context: git
Section: 7
Chapter: 10
Kind: environment variable

Variable: GIT_DIFF_PATH_COUNTER
Meaning: Which file in a series is being diffed (starting at 1)
Page: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery
Context: git
Section: 7
Chapter: 10
Kind: environment variable

Fla: difftool
Effect: Run external command to run diff
Page: https://git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Basic-Snapshotting
Prefix: git
Chapter: A3
Section: 3

Fla: todo
Page: https://git-scm.com/docs/git-diff
Prefix: git diff

Fla: todo
Page: https://git-scm.com/docs/git-diff-index
Prefix: git diff-index

Fla: todo
Page: https://git-scm.com/docs/git-for-each-ref
Prefix: git difffor-eachref

Question: difference between --index and --cached
Answer: --cached require a command to work only on index
--index ensure a command works also on index
Page: https://git-scm.com/docs/gitcli
Context: git

Fla: --dir-diff
Effect: Copy the modified files to a temporary location and perform a directory diff on them. This mode never prompts before launching the diff tool.
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool
Flag abbreviation: -d

Fla: --no-prompt
Effect: Do not prompt before launching a diff tool.
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool
Flag abbreviation: -y

Fla: --rotate-to=<file>
Effect: Start showing the diff for the given path, the paths before it will move to end and output.
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool

Fla: --skip-to=<file>
Effect: Start showing the diff for the given path, skipping all the paths before it.
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool

Fla: --tool=<tool>
Effect: Use the diff tool specified by <tool>
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool
Flag abbreviation: -t <tool>

Fla: --tool-help
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool
Print: a list of diff tools that may be used with --tool.

Fla: --no-symlinks
Effect: Copy working tree instead of symlinking them for --dir-dif
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool

Fla: --extcmd=<command>
Effect: Specify a custom command for viewing diffs. git-difftool ignores the configured defaults and runs $command $LOCAL $REMOTE when this option is specified. Additionally, $BASE is set in the environment.
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool
Flag abbreviation: -x <command>

Fla: --gui
Effect: the default diff tool will be read from the configured diff.guitool variable instead of diff.tool
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool
Flag abbreviation: -g

Fla: --trust-exit-code
Effect: make git-difftool exit when an invoked diff tool returns a non-zero exit code.
Page: https://git-scm.com/docs/git-difftool
Prefix: git difftool

Variable: diff.tool
Meaning: The default diff tool to use.
Page: https://git-scm.com/docs/git-difftool

Variable: diff.guitool
Meaning: The default diff tool to use when --gui is specified.
Page: https://git-scm.com/docs/git-difftool

Variable: difftool.<tool>.path
Meaning: Override the path for the given tool. This is useful in case your tool is not in the PATH.
Page: https://git-scm.com/docs/git-difftool

Variable: difftool.<tool>.cmd
Meaning: Specify the command to invoke the specified diff tool.
Page: https://git-scm.com/docs/git-difftool

Variable: difftool.prompt
Meaning: Prompt before each invocation of the diff tool.
Page: https://git-scm.com/docs/git-difftool

Variable: difftool.trustExitCode
Meaning: Exit difftool if the invoked diff tool returns a non-zero exit status.
Page: https://git-scm.com/docs/git-difftool