git diff sha-for-pre-release
Then I though there must be a way to skip this and it turned out there is. When using git diff, there is an option, --diff-filter, among tons of others. And below are excerpted from the manual:
--diff-filter=[(A|C|D|M|R|T|U|X|B)…[*]]
Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type(i.e. regular file, symlink, submodule, …) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters (including none) can be used. When * (All-or-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected.
My favorite option is --diff-filter=MRT, which will skip added and delete files.
No comments:
Post a Comment