How to make git diff --ignore-space-change the default

前端 未结 6 1899

I could probably setup an alias, but it seems like I should be able to set this as an option in the config file, only I don\'t see anyway to do it.

I only want the <

6条回答
  •  情歌与酒
    2020-12-04 21:09

    You could use git alias or bash alias if you are using shell-available OS.

    1. git alias : Run this command to add alias:

      git config --global alias.dfw 'diff --ignore-space-change'

      --ignore-space-change can be abbreviated to -w
      to apply the alias using: git dfw

    2. bash alias : Run this command to add bash alias:

      echo "alias gitdfw='git diff --ignore-space-change'">>~/.profile

      Open a new terminal and you can directly run gitdfw to achieve the same.

提交回复
热议问题