#git-diff #git-repository #command #commit #staged #di #limited

yanked di2

diff files staged for commit in git repository, optionally limited to a given file or directory

0.8.0 Nov 16, 2019
0.0.1 Nov 14, 2019
0.0.0 Nov 14, 2019

#13 in #staged

ISC license

8KB
57 lines

di2

Crates.io

This crate provides the di command, and is part of the repotools set of utilities.

You can install all of the repotools utilites by running the following command in your terminal:

cargo install repotools

If you want to install only some of them, you can install them individually. Refer to the repotools for the full list of utilities and links to their individual crates.

To install di utility individually, run the following command in your terminal:

cargo install di2

Usage

di [<path>...] – diff files staged for commit in git repository, optionally limited to one or more files or directories

Prior to committing, and also now and then while still working on the code, it is very useful to review what you are about commit, both to ensure that you are about to commit what you think you are about to commit, and in order to write useful commit messages that accurately describe the changes.

di shows the diff for the staged changes against HEAD.

di is like git diff --cached, only more awesome.

Dependencies

~0.8–1.2MB
~14K SLoC