Commit without whitespace changes on github

后端 未结 4 969
长发绾君心
长发绾君心 2021-01-01 12:06

Is there a way to display a commit on github.com without showing whitespace changes?

Is there a way to display that from console? i.e. clone and then look at commit

4条回答
  •  温柔的废话
    2021-01-01 12:54

    There is a trio of options that you can use at the command line (with any of git's diff commands) for this:

    • --ignore-space-at-eol Ignore changes in whitespace at EOL.
    • -b, --ignore-space-change Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent.
    • -w, --ignore-all-space Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none.

    I don't believe github has implemented anything using these options.

提交回复
热议问题